remove unnecessary checks in conditionals