Fixed potential null pointer exceptions

updated functions that return a collection to return an empty collection
if an exception occurs, instead of returning null

'get next location' now correctly handles case where location is
deselected, and then 'get next location' is called