mpris: Check media if None in _get_media_id

Parameter media is None when there is no playlist and tracklist was
requested via the TrackList interface.
query: Remove undefined values from playlist order