**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->as_table.clear();
    create->if_not_exists = false;
    create->is_populate = false;
    create->replace_view = false;
    create->replace_table = false;
    create->create_or_replace = false;
    
    if (!create->isView())
        create->select = nullptr;
    create->format = nullptr;
    create->out_file = nullptr;
    if (create->uuid != UUIDHelpers::Nil)
        create->table = TABLE_WITH_UUID_NAME_PLACEHOLDER;
    WriteBufferFromOwnString statement_buf;
    formatAST(*create, statement_buf, false);
    writeChar('\n', statement_buf);
    return statement_buf.str();
}
void applyMetadataChangesToCreateQuery(const ASTPtr & query, const StorageInMemoryMetadata & metadata)
{
    auto & ast_create_query = query->as<ASTCreateQuery &>();
    bool has_structure = ast_create_query.columns_list && ast_create_query.columns_list->columns;
    if (ast_create_query.as_table_function && !has_structure)
        throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Cannot alter table {} because it was created AS table function"
                                                     " and doesn't have structure in metadata", backQuote(ast_create_query.table));
    assert(has_structure);
    ASTPtr new_columns = InterpreterCreateQuery::formatColumns(metadata.columns);
    ASTPtr new_indices = InterpreterCreateQuery::formatIndices(metadata.secondary_indices);
    ASTPtr new_constraints = InterpreterCreateQuery::formatConstraints(metadata.constraints);
    ast_create_query.columns_list->replace(ast_create_query.columns_list->columns, new_columns);