public static < T > T requireNonNull ( T object , String message ) { if ( object == null ) { throw new NullPointerException ( message ) ; } return object ; }
Verifies if the object is not null and returns it or throws a NullPointerException with the given message .