If I get a NullPointerException in a call like this:
someObject.getSomething().getSomethingElse(). getAnotherThing().getYetAnotherObject().getValue();
Early failure is also an option.
Anywhere in your code that a null value can be returned, consider introducing a check for a null return value.
public Foo getSomething() { Foo result; ... if (result == null) { throw new IllegalStateException("Something is missing"); } return result; }