Added better checking for when datasets don't have any locations.