Check if a search term is given before saving it