Try to avoid unnecessary nesting by returning a value early

Try to avoid unnecessary nesting by returning a value early

Too much nesting & else statements tend to make code harder to read.

We're writing a book, you can get it for free here.