WL-3116 Make an attempt at catching NPE

Getting a frustrating NPE now that we are using GetAllLocations in unusual
places. Hopefully this will stop things from tripping up.
Merge pull request #24 from ox-it/WL-3116

WL-3116 Make an attempt at preventing NPE