Replace a conditional with a guard.