Added more thorough checking for videojs objects