Correctly escaping NULL; that is: do NOT add quotation marks if running SQLite

Alternative to Pull Request #2075; simply don't add quotation marks around NULL when running SQLite.