Fix a null pointer exception when location is unknown

This might be a little aggressive. I think it basically makes it impossible to clear the location, although that should never happen anyway, right? :smirk_cat: