Use Null constant from python-sql for comparisons

issue4143
review13701003