Reduces nesting with an early return