``` sql
SELECT NULL, uniqUpTo(2)([[], [], ['', 'aa', NULL], ['\0\0', '\0'], []], x) FROM (SELECT arrayJoin([[uniq(['aaaa', NULL, '', ''], [[], ['', '', NULL, NULL, ''], []])]]) AS x)
```

```
../src/Common/FieldVisitors.h:148:22: runtime error: nan is outside the range of representable values of type 'unsigned long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/Common/FieldVisitors.h:148:22 in
```
{
public:
    T operator() (const Null &) const
    {
        throw Exception("Cannot convert NULL to " + demangle(typeid(T).name()), ErrorCodes::CANNOT_CONVERT_TYPE);
    }
    T operator() (const String &) const
    {
        throw Exception("Cannot convert String to " + demangle(typeid(T).name()), ErrorCodes::CANNOT_CONVERT_TYPE);
    }
    T operator() (const Array &) const
    {
        throw Exception("Cannot convert Array to " + demangle(typeid(T).name()), ErrorCodes::CANNOT_CONVERT_TYPE);
    }
    T operator() (const Tuple &) const
    {
        throw Exception("Cannot convert Tuple to " + demangle(typeid(T).name()), ErrorCodes::CANNOT_CONVERT_TYPE);
    }
    T operator() (const UInt64 & x) const { return T(x); }
    T operator() (const Int64 & x) const { return T(x); }
    T operator() (const Int128 & x) const { return T(x); }
    T operator() (const Float64 & x) const
    {
        if constexpr (std::is_same_v<Decimal256, T>)
            return Int256(x);
        else
            return T(x);
    }
    T operator() (const UInt128 &) const