public static void checkNull(Object o, Supplier<String> msg) {
        if (o != null)
            error(msg.get());
    }
public static void checkNull ( Object o , Supplier < String > msg ) { if ( o != null ) error ( msg . get ( ) ) ; }
Equivalent to
assert (o == null) : msg.get();
Note: message string is computed lazily.