Should work for the case of searchLocations being null as well given it's a public method.