You don't need two if conditions for that. One check is enough because they are always both true/false.