Small cleanup of how RegionToEndpoint checks arguments.
Finished partial fix in 91f405c9fedf24822015172e9e3c50acbd855d28.