Making sure search.length > 0