private static Schema assertSchemaNotNull(Schema schema, String location) {
        if (schema == null) {
            throw new DataException("No schema defined for " + location);
        }
        return schema;
    }
Validate that the value can be used with the schema, i.e. that its type matches the schema type and nullability
requirements. Throws a {@link DataException} if the value is invalid.
@param schema Schema to test
@param value value to test
connect/api/src/main/java/org/apache/kafka/connect/data/ConnectSchema.java