properly verify search input