Collapse two if statements into one.