reduce nesting by using a return condition rather than two if branches

Authored by sitter on Jul 2 2019, 11:28 AM.