Fixed a couple bugs re: raw SQL IS NULL check