Ensure a return occurs inside an if