player: add nil check