Bug fix: logical expression with date types should also be boolean

Previously, the boolean type was not correct assigned