Fixed condition check when no locations could be found in the database.
Fix for issue occuring when data source contains malformed entries.