Constraints on Nullable types don't seem to work and return errors like the following:
```
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Constraint `c0` does not return a value of type UInt8.
```

**Does it reproduce on recent release?**

This issue has been encountered on Clickhouse `20.10.2.20`. I did not test latest `master`.
```
$ clickhouse-server --version
ClickHouse server version 20.10.2.20 (official build).
```

EDIT: this is also reproducible with the latest stable release:
```
$ clickhouse-server --version
ClickHouse server version 21.2.4.6 (official build).
```

**How to reproduce**

All settings are defaults.

To reproduce the error, create the following table:
```
CREATE TABLE foo.bar
(
    `id` UInt32,
    `buggy` Nullable(UInt32),
    CONSTRAINT `c0` CHECK `buggy` = 1
)
ENGINE = MergeTree()
PRIMARY KEY `id`
ORDER BY `id`
```

The table creation works fine. However, one gets an exception when trying to insert:
```
server :) INSERT INTO foo.bar VALUES (0, 1)

INSERT INTO foo.bar VALUES


Received exception from server (version 20.10.2):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Constraint `c0` does not return a value of type UInt8. 

1 rows in set. Elapsed: 0.001 sec.
```

The exception is unexpected as the constraint is a valid boolean expression. Not that I tried many variants of the constraints and the only one referring the field `buggy` that worked as expected is:
 ```
CONSTRAINT `c0` CHECK isNull(`buggy`)
```

**Expected behavior**

No exception raised as the constraint is a valid boolean expression.

**Error message and/or stacktrace**

```
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Constraint `c0` does not return a value of type UInt8. 
```

**Additional context**

The following issue may be related: #19334
#include <DataStreams/CheckConstraintsBlockOutputStream.h>
#include <Parsers/formatAST.h>
#include <Interpreters/ExpressionActions.h>
#include <Columns/ColumnsCommon.h>
#include <Columns/ColumnsNumber.h>
#include <Columns/ColumnConst.h>
#include <Common/assert_cast.h>
#include <Common/quoteString.h>
#include <Common/FieldVisitors.h>
namespace DB
{
namespace ErrorCodes
{
    extern const int VIOLATED_CONSTRAINT;
    extern const int LOGICAL_ERROR;
}
CheckConstraintsBlockOutputStream::CheckConstraintsBlockOutputStream(
    const StorageID & table_id_,
    const BlockOutputStreamPtr & output_,
    const Block & header_,
    const ConstraintsDescription & constraints_,
    const Context & context_)
    : table_id(table_id_),
    output(output_),
    header(header_),
    constraints(constraints_),
    expressions(constraints_.getExpressions(context_, header.getNamesAndTypesList()))
{
}
void CheckConstraintsBlockOutputStream::write(const Block & block)