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
column_values_msg.append(backQuoteIfNeed(name));
                        column_values_msg.append(" = ");
                        column_values_msg.append(applyVisitor(FieldVisitorToString(), column[row_idx]));
                        first = false;
                    }
                    throw Exception(ErrorCodes::VIOLATED_CONSTRAINT,
                                    "Constraint {} for table {} is violated at row {}. Expression: ({}). Column values: {}",
                                    backQuote(constraint_ptr->name), table_id.getNameForLogs(), rows_written + row_idx + 1,
                                    serializeAST(*(constraint_ptr->expr), true), column_values_msg);
                }
            }
        }
    }
    output->write(block);
    rows_written += block.rows();
}
void CheckConstraintsBlockOutputStream::flush()
{
    output->flush();
}
void CheckConstraintsBlockOutputStream::writePrefix()
{
    output->writePrefix();
}
void CheckConstraintsBlockOutputStream::writeSuffix()
{
    output->writeSuffix();
}
}