Dude! This is a really good advice. I want more!
Deep nesting is a huge problem on my work. I always re-code and change the "if" exactly like you suggest
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.