Consider I have a object like this:
Obj.Boo.Foo.Zoo
Ok now if I want to be sure that zoo has a value and not empty, I should do:
if(Obj != null && Obj.Boo != null && Obj.Boo.Foo != null && Obj.Boo.Foo.Zoo != null) {
//blah blah
}
And If I have more nested objects after Zoo, I should expand the if and the code becomes a little bit malformed.
Is there any better way for doing that type of conditions?