Error checking for advanced search

Part of OOIION-1413