
**Describe the bug**
[A link to the report](https://s3.amazonaws.com/clickhouse-test-reports/32291/2f43445a34c91beb1104422308ba5abfdf7be5bb/fuzzer_astfuzzertsan,actions//report.html)

**How to reproduce**

```SQL
CREATE TABLE t1 (`id` Int32, `key` String, `key2` String) ENGINE = TinyLog;
CREATE TABLE t2 (`id` Int32, `key` String, `key2` String) ENGINE = TinyLog;
SELECT (t1.id = t2.id) AND (t2.key = t2.key2) AND ((t1.id = t2.id) AND (t2.key = t2.key2) AND (t1.key = t1.key2) AND (t2.key2 = NULL)) AND (t1.key = t1.key2) AND (t2.key2 = NULL), NULL FROM t1 ANY INNER JOIN t2 ON (t1.key = t1
.key2) AND (NULL = t1.key) AND (t2.key = t2.key2) AND ((NULL = t1.key) = t2.id) AND (('' = t1.key) = t2.id) AND (t2.key2 = NULL);
```

{
    size_t keys_size = key_names.size();
    ColumnRawPtrs key_columns(keys_size);
    for (size_t i = 0; i < keys_size; ++i)
    {
        const String & column_name = key_names[i];
        key_columns[i] = block_keys.getByName(column_name).column.get();
        
        if (const auto * nullable = checkAndGetColumn<ColumnNullable>(*key_columns[i]))
            key_columns[i] = &nullable->getNestedColumn();
    }
    return key_columns;
}
void checkTypesOfKeys(const Block & block_left, const Names & key_names_left,
                      const Block & block_right, const Names & key_names_right)
{
    size_t keys_size = key_names_left.size();
    for (size_t i = 0; i < keys_size; ++i)
    {
        DataTypePtr left_type = removeNullable(recursiveRemoveLowCardinality(block_left.getByName(key_names_left[i]).type));
        DataTypePtr right_type = removeNullable(recursiveRemoveLowCardinality(block_right.getByName(key_names_right[i]).type));
        if (!left_type->equals(*right_type))
            throw Exception("Type mismatch of columns to JOIN by: "
                            + key_names_left[i] + " " + left_type->getName() + " at left, "
                            + key_names_right[i] + " " + right_type->getName() + " at right",
                            ErrorCodes::TYPE_MISMATCH);
    }
}
void checkTypesOfKeys(const Block & block_left, const Names & key_names_left, const String & condition_name_left,