adjusted logic for searching so that user wont fire searchItem function if nothing is inputted in searchBar