Remove redundant code for boolean checks