Added error handling of the search query during node validation