Fixed bug in location search causing empty results
Added preventive check