**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
```
else if (typeid_cast<DatabaseAtomic *>(this) && typeid_cast<DatabaseOrdinary *>(&to_database))
            from_atomic_to_ordinary = true;
        else if (dynamic_cast<DatabaseAtomic *>(this) && typeid_cast<DatabaseOrdinary *>(&to_database) && getEngineName() == "Replicated")
            from_atomic_to_ordinary = true;
        else
            throw Exception("Moving tables between databases of different engines is not supported", ErrorCodes::NOT_IMPLEMENTED);
    }
    auto table_data_relative_path = getTableDataPath(table_name);
    TableExclusiveLockHolder table_lock;
    String table_metadata_path;
    ASTPtr attach_query;
    
    StoragePtr table = tryGetTable(table_name, getContext());
    detachTable(table_name);
    UUID prev_uuid = UUIDHelpers::Nil;
    try
    {
        table_lock = table->lockExclusively(
            local_context->getCurrentQueryId(), local_context->getSettingsRef().lock_acquire_timeout);
        table_metadata_path = getObjectMetadataPath(table_name);
        attach_query = parseQueryFromMetadata(log, local_context, table_metadata_path);
        auto & create = attach_query->as<ASTCreateQuery &>();
        create.database = to_database.getDatabaseName();
        create.table = to_table_name;
        if (from_ordinary_to_atomic)
            create.uuid = UUIDHelpers::generateV4();
        if (from_atomic_to_ordinary)
            std::swap(create.uuid, prev_uuid);
        if (auto * target_db = dynamic_cast<DatabaseOnDisk *>(&to_database))
            target_db->checkMetadataFilenameAvailability(to_table_name);