@Override
        public void write(ByteBuffer buffer, Object o) {
            if (o == null) {
                ByteUtils.writeUnsignedVarint(0, buffer);
            } else {
                byte[] bytes = Utils.utf8((String) o);
                if (bytes.length > Short.MAX_VALUE)
                    throw new SchemaException("String length " + bytes.length + " is larger than the maximum string length.");
                ByteUtils.writeUnsignedVarint(bytes.length + 1, buffer);
                buffer.put(bytes);
            }
        }
The Boolean type represents a boolean value in a byte by using
the value of 0 to represent false, and 1 to represent true.

If for some reason a value that is not 0 or 1 is read,
then any non-zero value will return true.
clients/src/main/java/org/apache/kafka/common/protocol/types/Type.java