Error checking for advanced search

Part of JIRA [OOIION-1413](https://jira.oceanobservatories.org/tasks/browse/OOIION-1413)