**Describe the bug**
There is a lot of similar reports (https://github.com/ClickHouse/ClickHouse/issues/7509) but they mostly related to https://github.com/ClickHouse/ClickHouse/issues/12587 and If/case statements.

**How to reproduce**
Clickhouse version 21.5
```
SELECT
    1 / CAST(NULL, 'Nullable(UInt32)') AS int,
    1 / CAST(NULL, 'Nullable(UInt32)') AS float

Query id: 8f68936f-3ff9-4637-bc63-c19fc71a58ed

┌──int─┬─float─┐
│ ᴺᵁᴸᴸ │  ᴺᵁᴸᴸ │
└──────┴───────┘

SELECT 1 / CAST(NULL, 'Nullable(Decimal(7, 2))')

Query id: ed010d6a-4924-4af3-a200-701deeb9d2f4


0 rows in set. Elapsed: 0.002 sec.

Received exception from server (version 21.5.1):
Code: 153. DB::Exception: Received from localhost:9000. DB::Exception: Division by zero: While processing 1 / CAST(NULL, 'Nullable(Decimal(7, 2))').
```

{
        const IColumn & lhs_column = *arguments[0].column;
        const IColumn & rhs_column = *arguments[1].column;
        bool lhs_is_const = isColumnConst(lhs_column);
        bool rhs_is_const = isColumnConst(rhs_column);
        const ColumnAggregateFunction & lhs = typeid_cast<const ColumnAggregateFunction &>(
            lhs_is_const ? assert_cast<const ColumnConst &>(lhs_column).getDataColumn() : lhs_column);
        const ColumnAggregateFunction & rhs = typeid_cast<const ColumnAggregateFunction &>(
            rhs_is_const ? assert_cast<const ColumnConst &>(rhs_column).getDataColumn() : rhs_column);
        AggregateFunctionPtr function = lhs.getAggregateFunction();
        size_t size = (lhs_is_const && rhs_is_const) ? 1 : input_rows_count;
        auto column_to = ColumnAggregateFunction::create(function);
        column_to->reserve(size);
        for (size_t i = 0; i < size; ++i)
        {
            column_to->insertFrom(lhs.getData()[lhs_is_const ? 0 : i]);
            column_to->insertMergeFrom(rhs.getData()[rhs_is_const ? 0 : i]);
        }
        if (lhs_is_const && rhs_is_const)
            return ColumnConst::create(std::move(column_to), input_rows_count);
        else
            return column_to;
    }
    ColumnPtr executeDateTimeIntervalPlusMinus(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type,