Fix error in suggestions when there is no solr response.
Also use safe_hasattr instead of hasattr which doesn't catch all
exceptions.