Prevent such nested expressions. They are a pain to read and also a pain to debug. If a NPE happens, you have no idea where it happened. I use additional local variables just for this purpose and the JIT will get rid of them, so they don't cost anything.