search error checking