Added a check for locations before attempting to show them