Simplify two if's.