I have noted that many Java 8 methods in Oracle JDK use Objects.requireNonNull(), which internally throws NullPointerException if the given object
As a side note, this fail fast before Object#requireNotNull was implemented slightly different before java-9 inside some of the jre classes themselves. Suppose the case :
Consumer consumer = System.out::println;
In java-8 this compiles as (only the relevant parts)
getstatic Field java/lang/System.out
invokevirtual java/lang/Object.getClass
Basically an operation as : yourReference.getClass - which would fail if yourRefercence is null.
Things have changed in jdk-9 where the same code compiles as
getstatic Field java/lang/System.out
invokestatic java/util/Objects.requireNonNull
Or basically Objects.requireNotNull (yourReference)