Fix for issues #291 and #293

SQL query in search (used in mass classification) was looking for IS NOT NULL when it should have been looking for IS NULL