Changed getLocData to be able to handle a non-Iterable error