How do I avoid checking for nulls in Java?

I use x != null to avoid NullPointerException. Is there an alternative? if (x != null) { // ... }