public static < T > T assertNotNull ( T argument , String msg ) { if ( argument == null ) throw new IllegalArgumentException ( msg ) ; return argument ; }
Throws IllegalArgumentException with the specified error message if the input is null otherwise return the input as is .