Fixing type error for playlists

Checking to make sure type exists before trying to use it.