**Describe the issue**
On empty strings, the behaviour of the function `CAST('', 'IPv6')` changed between the versions 21.x and 22.x

**How to reproduce**
On 21.8.14.5:
```
SELECT CAST('', 'IPv6');
Returns: 
	
::
```

On 22.2.2.1:
```
SELECT CAST('', 'IPv6');
Triggers error: 

Code: 441. DB::Exception: Invalid IPv6 value.: While processing CAST('', 'IPv6'). (CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING) (version 22.2.2.1)

```

**Additional context**
This can prevent some users from upgrading to 22.x when the use of this function is spread across a number of table definitions and environments. The following workaround `CAST(toFixedString('', 16), 'IPv6')` works but the manual task of updating all the occurrences is challenging.

{
        DataTypes data_types(arguments.size());
        for (size_t i = 0; i < arguments.size(); ++i)
            data_types[i] = arguments[i].type;
        auto monotonicity = MonotonicityHelper::getMonotonicityInformation(arguments.front().type, return_type.get());
        return std::make_unique<FunctionCast<FunctionName>>(name, std::move(monotonicity), data_types, return_type, diagnostic, cast_type, cast_ipv4_ipv6_default_on_conversion_error);
    }
    DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override
    {
        const auto & column = arguments.back().column;
        if (!column)
            throw Exception("Second argument to " + getName() + " must be a constant string describing type."
                " Instead there is non-constant column of type " + arguments.back().type->getName(),
                ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        const auto * type_col = checkAndGetColumnConst<ColumnString>(column.get());
        if (!type_col)
            throw Exception("Second argument to " + getName() + " must be a constant string describing type."
                " Instead there is a column with the following structure: " + column->dumpStructure(),
                ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
        DataTypePtr type = DataTypeFactory::instance().get(type_col->getValue<String>());
        if constexpr (cast_type == CastType::accurateOrNull)
            return makeNullable(type);
        if constexpr (internal)
            return type;
        if (keep_nullable && arguments.front().type->isNullable() && type->canBeInsideNullable())
            return makeNullable(type);
        return type;
    }
    bool useDefaultImplementationForNulls() const override { return false; }