**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))').
```

*/
enum class OpCase { Vector, LeftConstant, RightConstant };
constexpr const auto & undec(const auto & x) { return x; }
constexpr const auto & undec(const is_decimal auto & x) { return x.value; }
template <typename A, typename B, typename Op, typename OpResultType = typename Op::ResultType>
struct BinaryOperation
{
    using ResultType = OpResultType;
    static const constexpr bool allow_fixed_string = false;
    static const constexpr bool allow_string_integer = false;
    template <OpCase op_case>
    static void NO_INLINE process(const A * __restrict a, const B * __restrict b, ResultType * __restrict c, size_t size)
    {
        for (size_t i = 0; i < size; ++i)
            if constexpr (op_case == OpCase::Vector)
                c[i] = Op::template apply<ResultType>(a[i], b[i]);
            else if constexpr (op_case == OpCase::LeftConstant)
                c[i] = Op::template apply<ResultType>(*a, b[i]);
            else
                c[i] = Op::template apply<ResultType>(a[i], *b);
    }
    static ResultType process(A a, B b) { return Op::template apply<ResultType>(a, b); }
};
template <typename B, typename Op>
struct StringIntegerOperationImpl
{
    static const constexpr bool allow_fixed_string = false;
    static const constexpr bool allow_string_integer = true;
    template <OpCase op_case>
    static void NO_INLINE processFixedString(const UInt8 * __restrict in_vec, const UInt64 n, const B * __restrict b, ColumnFixedString::Chars & out_vec, size_t size)