Could you explain the need for this if statement?