typeahead now checks if data is empty