Rewrite conditional statement to avoid mid-method return statement (and also catch an incorrect variable declaration)