Add null check to the winner method