**How to reproduce**
Clickhouse version 21.5

```
cat /etc/clickhouse-server/users.xml
<?xml version="1.0"?>
<yandex>
    <!-- Profiles of settings. -->
    <profiles>
        <!-- Default settings. -->
        <default>
            <data_type_default_nullable>1</data_type_default_nullable>
            <load_balancing>random</load_balancing>
        </default>
....

2021.04.04 01:23:42.453678 [ 29048 ] {} <Error> Application: DB::Exception: Nested type Array(UInt64) cannot be inside Nullable type: Cannot attach table `system`.`crash_log` from metadata file /var/lib/clickhouse/metadata/system/crash_log.sql from query ATTACH TABLE system.crash_log (`event_date` Date, `event_time` DateTime, `timestamp_ns` UInt64, `signal` Int32, `thread_id` UInt64, `query_id` String, `trace` Array(UInt64), `trace_full` Array(String), `version` String, `revision` UInt32, `build_id` String) ENGINE = MergeTree ORDER BY (event_date, event_time) SETTINGS index_granularity = 8192: while loading database `system` from path /var/lib/clickhouse/metadata/system
```
create.uuid = UUIDHelpers::generateV4();
        metadata_path = metadata_path / "store" / DatabaseCatalog::getPathForUUID(create.uuid);
        if (!create.attach && fs::exists(metadata_path))
            throw Exception(ErrorCodes::DATABASE_ALREADY_EXISTS, "Metadata directory {} already exists", metadata_path.string());
    }
    else if (create.storage->engine->name == "MaterializeMySQL")
    {
        
        
        
        
        bool attach_from_user = create.attach && !internal && !create.attach_short_syntax;
        bool create_from_user = !create.attach;
        if (create_from_user)
        {
            const auto & default_engine = getContext()->getSettingsRef().default_database_engine.value;
            if (create.uuid == UUIDHelpers::Nil && default_engine == DefaultDatabaseEngine::Atomic)
                create.uuid = UUIDHelpers::generateV4();    
        }
        else if (attach_from_user && create.uuid == UUIDHelpers::Nil)
        {
            
            
            throw Exception("Use short attach syntax ('ATTACH DATABASE name;' without engine) to attach existing database "
                            "or specify UUID to attach new database with Atomic engine", ErrorCodes::INCORRECT_QUERY);
        }
        
        if (create.uuid == UUIDHelpers::Nil)
            metadata_path = metadata_path / "metadata" / database_name_escaped;
        else