error checking in searchResult