public static Boolean convertToBoolean(Schema schema, Object value) throws DataException {
        if (value == null) {
            return null;
        } else if (value instanceof Boolean) {
            return (Boolean) value;
        } else if (value instanceof String) {
            SchemaAndValue parsed = parseString(value.toString());
            if (parsed.value() instanceof Boolean) {
                return (Boolean) parsed.value();
            }
        }
        return asLong(value, schema, null) == 0L ? Boolean.FALSE : Boolean.TRUE;
    }
Convert the specified value to a {@link Type#BOOLEAN} value. The supplied schema is required if the value is a logical
type when the schema contains critical information that might be necessary for converting to a boolean.

@param schema the schema for the value; may be null
@param value  the value to be converted; may be null
@return the representation as a boolean, or null if the supplied value was null
@throws DataException if the value could not be converted to a boolean
connect/api/src/main/java/org/apache/kafka/connect/data/Values.java