Refactor return value evaluation to be more concise.