Instead of } else { make an early return in the if.