Check two conditions at once