Simplify some return and condition statements.