public static void stateNotNull ( final Object obj , final String message ) throws IllegalStateException { if ( obj == null ) { throw new IllegalStateException ( message ) ; } }
Checks that obj is not null throws exception if it is .