Explanation of if statement