**Describe the bug**

`sumIf` returns incorrect results in some cases with Nullable arguments.

**How to reproduce**

* Which ClickHouse server version to use
Latest master/arcadia version

* Queries to run that lead to unexpected result
```sql
:) select sumIf(toFloat64OrZero(b), a = 0) as r1, sumIf(cast(b as Float), a = 0) as r2, sum(if(a = 0, toFloat64OrZero(b), 0)) as r3 from (select arrayJoin([1, 2, 3, NULL]) as a, toNullable('10.0') as b)

SELECT
    sumIf(toFloat64OrZero(b), a = 0) AS r1,
    sumIf(CAST(b, 'Float'), a = 0) AS r2,
    sum(if(a = 0, toFloat64OrZero(b), 0)) AS r3
FROM
(
    SELECT
        arrayJoin([1, 2, 3, NULL]) AS a,
        toNullable('10.0') AS b
)

Query id: 2e4e320d-e52a-4514-bc6f-118485558191

┌─r1─┬─r2─┬─r3─┐
│ 10 │  0 │  0 │
└────┴────┴────┘
```
**Expected behavior**

All results are 0.

**Additional context**

It breaks when null values in Nullable column are compared with `assumeNotNull` from this column.
It also only breaks when first argument is Nullable too.


{
    if (creator_with_properties.creator == nullptr)
        throw Exception("AggregateFunctionFactory: the aggregate function " + name + " has been provided "
            " a null constructor", ErrorCodes::LOGICAL_ERROR);
    if (!aggregate_functions.emplace(name, creator_with_properties).second)
        throw Exception("AggregateFunctionFactory: the aggregate function name '" + name + "' is not unique",
            ErrorCodes::LOGICAL_ERROR);
    if (case_sensitiveness == CaseInsensitive)
    {
        auto key = Poco::toLower(name);
        if (!case_insensitive_aggregate_functions.emplace(key, creator_with_properties).second)
            throw Exception("AggregateFunctionFactory: the case insensitive aggregate function name '" + name + "' is not unique",
                ErrorCodes::LOGICAL_ERROR);
        case_insensitive_name_mapping[key] = name;
    }
}
static DataTypes convertLowCardinalityTypesToNested(const DataTypes & types)
{
    DataTypes res_types;
    res_types.reserve(types.size());
    for (const auto & type : types)
        res_types.emplace_back(recursiveRemoveLowCardinality(type));
    return res_types;
}
AggregateFunctionPtr AggregateFunctionFactory::get(
    const String & name, const DataTypes & argument_types, const Array & parameters, AggregateFunctionProperties & out_properties) const
{
    auto type_without_low_cardinality = convertLowCardinalityTypesToNested(argument_types);