Coalesce two if statements that check for the same thing.