Compound if/then check