presto-main/src/main/java/io/prestosql/sql/analyzer/ExpressionAnalyzer.java/ExpressionAnalyzer/visitNotExpression
class ExpressionAnalyzer:        @Override
        protected Type visitNotExpression(NotExpression node, StackableAstVisitorContext<Context> context)
        {
            coerceType(context, node.getValue(), BOOLEAN, "Value of logical NOT expression");

            return setExpressionType(node, BOOLEAN);
        }