Adding validation upon search query