few practices to avoid NPE in Java tricks to avoid NullPointerException in Java avoid NullPointerException avoid != null check and NullPointerException avoid != null check and NullPointerException avoid != null check and NullPointerException better techniques