@Override
    public char asCharacter() {
        String s = asString();
        if (s == null) {
            return '\0';
        } else if (s.length() != 1) {
            throw new IllegalArgumentException(
                    ClickHouseUtils.format("Expect single-character string but we got [%s]", s));
        }
        return s.charAt(0);
    }
Update value of the given object or create a new instance if {@code ref} is
null.

@param ref   object to update, could be null
@param bytes bytes
@return same object as {@code ref} or a new instance if it's null
clickhouse-data/src/main/java/com/clickhouse/data/value/ClickHouseStringValue.java