separate 'if' to return earlier

Authored by hindenburg on Mar 11 2018, 11:54 PM.