public static ClickHouseMapValue of(ClickHouseValue ref, Map<?, ?> value, Class<?> keyType, Class<?> valueType) {
        return ref instanceof ClickHouseMapValue ? ((ClickHouseMapValue) ref).set(value)
                : new ClickHouseMapValue(value, keyType, valueType);
    }
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 value     value
@param keyType   non-null class of key
@param valueType non-null class of value
@return same object as {@code ref} or a new instance if it's null
clickhouse-data/src/main/java/com/clickhouse/data/value/ClickHouseMapValue.java