Fix a null pointer exception when no duration is available for video or music