driver-core/src/main/com/mongodb/assertions/Assertions.java
public static <T> T notNull(final String name, final T value, final SingleResultCallback<?> callback) {
        if (value == null) {
            IllegalArgumentException exception = new IllegalArgumentException(name + " can not be null");
            callback.onResult(null, exception);
            throw exception;
        }
        return value;
    }
public static <T> T notNull(final String name, final T value, final SingleResultCallback<?> callback) {
        if (value == null) {
            IllegalArgumentException exception = new IllegalArgumentException(name + " can not be null");
            callback.onResult(null, exception);
            throw exception;
        }
        return value;
    }
Throw IllegalArgumentException if the value is null.

@param name  the parameter name
@param value the value that should not be null
@param callback  the callback that also is passed the exception if the value is null
@param <T>   the value type
@return the value
@throws java.lang.IllegalArgumentException if value is null