**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.

#pragma once
#include <Functions/FunctionsConversion.h>
namespace DB
{
namespace ErrorCodes
{
    extern const int ILLEGAL_TYPE_OF_ARGUMENT;
}
/*
 * CastInternal does not preserve nullability of the data type,
 * i.e. CastInternal(toNullable(toInt8(1)) as Int32) will be Int32(1).
 *
 * Cast preserves nullability according to setting `cast_keep_nullable`,
 * i.e. Cast(toNullable(toInt8(1)) as Int32) will be Nullable(Int32(1)) if `cast_keep_nullable` == 1.
**/
template<CastType cast_type, bool internal, typename CastName, typename FunctionName>
class CastOverloadResolverImpl : public IFunctionOverloadResolver