Added database specific NULL field checks

This fixes searching for bookmarks with both MySQL and SQLite database backends.