Remove redundant if statements.