Remove unnecessary boolean checks