Collapse two identical if statements into a single body.