Fix typo in boolean check