check for NULL

This makes it usable with FTS4 tables.