[BlackBerry] Add a null check for media implementation to fix a crash.