**Describe the bug**

A combination of `use_join_nulls=1`, a `Nullable(enum)` column, `OUTER JOIN`, and `toString()` may throw an exception while generating a result.

**Does it reproduce on recent release?**

This happens on 21.6.3 stable.

**How to reproduce**

With the following setup:

```sql
CREATE TABLE a (
  key  String
) ENGINE=MergeTree ORDER BY key;

CREATE TABLE b (
  key  String,
  data Nullable(Enum16('a'=1, 'b'=2))
) ENGINE=MergeTree ORDER BY key;

INSERT INTO a VALUES('x');
INSERT INTO a VALUES('y');

INSERT INTO b VALUES('x', 'a');
```

This query appears to work correctly:
```
SELECT
	key, data
FROM a
ANY LEFT OUTER JOIN b USING (key)
FORMAT JSONCompact
SETTINGS join_use_nulls = 1;
```

```
{
        "meta":
        [
                {
                        "name": "key",
                        "type": "String"
                },
                {
                        "name": "data",
                        "type": "Nullable(Enum16('a' = 1, 'b' = 2))"
                }
        ],
        "data":
        [
                ["y", null],                                                                                                                                                                                                
                ["x", "a"]                                                                                                                                                                                                     
        ],
        "rows": 2,
        "statistics":
        {
                "elapsed": 0.002955967,
                "rows_read": 3,
                "bytes_read": 33
        }
}
```

But it throws an exception when `toString()` is applied to the joined column:

```sql
SELECT
	key, toString(data)
FROM a
LEFT OUTER JOIN b USING (key)
FORMAT JSONCompact
SETTINGS join_use_nulls = 1;
```

```
{
        "meta":
        [
                {
                        "name": "key",
                        "type": "String"
                },
                {
                        "name": "toString(data)",
                        "type": "Nullable(String)"
                }
        ],

        "data":
        [
                ["x", "a"]                                                                                                                                                                                                      Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
1 rows in set. Elapsed: 0.003 sec.

Received exception from server (version 21.6.3):
Code: 36. DB::Exception: Received from localhost:9000. DB::Exception: Unexpected value 0 in enum: while executing 'FUNCTION toString(data :: 1) -> toString(data) Nullable(String) : 2'.
```

**Expected behavior**

It produces a string `NULL` without throwing an exception.
using FunctionToDateTime = FunctionConvert<DataTypeDateTime, NameToDateTime, ToDateTimeMonotonicity>;
using FunctionToDateTime32 = FunctionConvert<DataTypeDateTime, NameToDateTime32, ToDateTimeMonotonicity>;
using FunctionToDateTime64 = FunctionConvert<DataTypeDateTime64, NameToDateTime64, UnknownMonotonicity>;
using FunctionToUUID = FunctionConvert<DataTypeUUID, NameToUUID, ToNumberMonotonicity<UInt128>>;
using FunctionToString = FunctionConvert<DataTypeString, NameToString, ToStringMonotonicity>;
using FunctionToUnixTimestamp = FunctionConvert<DataTypeUInt32, NameToUnixTimestamp, ToNumberMonotonicity<UInt32>>;
using FunctionToDecimal32 = FunctionConvert<DataTypeDecimal<Decimal32>, NameToDecimal32, UnknownMonotonicity>;
using FunctionToDecimal64 = FunctionConvert<DataTypeDecimal<Decimal64>, NameToDecimal64, UnknownMonotonicity>;
using FunctionToDecimal128 = FunctionConvert<DataTypeDecimal<Decimal128>, NameToDecimal128, UnknownMonotonicity>;
using FunctionToDecimal256 = FunctionConvert<DataTypeDecimal<Decimal256>, NameToDecimal256, UnknownMonotonicity>;
template <typename DataType> struct FunctionTo;
template <> struct FunctionTo<DataTypeUInt8> { using Type = FunctionToUInt8; };
template <> struct FunctionTo<DataTypeUInt16> { using Type = FunctionToUInt16; };
template <> struct FunctionTo<DataTypeUInt32> { using Type = FunctionToUInt32; };
template <> struct FunctionTo<DataTypeUInt64> { using Type = FunctionToUInt64; };
template <> struct FunctionTo<DataTypeUInt128> { using Type = FunctionToUInt128; };
template <> struct FunctionTo<DataTypeUInt256> { using Type = FunctionToUInt256; };
template <> struct FunctionTo<DataTypeInt8> { using Type = FunctionToInt8; };
template <> struct FunctionTo<DataTypeInt16> { using Type = FunctionToInt16; };
template <> struct FunctionTo<DataTypeInt32> { using Type = FunctionToInt32; };
template <> struct FunctionTo<DataTypeInt64> { using Type = FunctionToInt64; };
template <> struct FunctionTo<DataTypeInt128> { using Type = FunctionToInt128; };
template <> struct FunctionTo<DataTypeInt256> { using Type = FunctionToInt256; };
template <> struct FunctionTo<DataTypeFloat32> { using Type = FunctionToFloat32; };
template <> struct FunctionTo<DataTypeFloat64> { using Type = FunctionToFloat64; };
template <> struct FunctionTo<DataTypeDate> { using Type = FunctionToDate; };
template <> struct FunctionTo<DataTypeDateTime> { using Type = FunctionToDateTime; };
template <> struct FunctionTo<DataTypeDateTime64> { using Type = FunctionToDateTime64; };
template <> struct FunctionTo<DataTypeUUID> { using Type = FunctionToUUID; };
template <> struct FunctionTo<DataTypeString> { using Type = FunctionToString; };