CameraDevice null check is added.