Remove unneeded if-clauses.