it gives if (typeof key !== 'string') throw new Error('The YouTube API key you provided was not a string.'); this kind of errir