change the conditional as per the comment

Could you merge this code or fix the comment?