A null check is added to avoid crashes when the camera is removed during the game and no other is available