protected static < U > U nullCheck ( U value , String message ) { if ( value == null ) { throw new NullPointerException ( message ) ; } return value ; }
Checks if the value is null and if so throws a NullPointerException with the given message .