How can I combine two IF-clauses with an AND?