I find code flow little hard to follow and would very much prefer something along this lines:

```js

const parseURI = uri => {
  try { return newURI(uri) }
  catch (_) { return null }
}

const getLocaleURL = locale => {
  const uri = parseURI(locale)
  return uri ? uri.spec : baseURI + locale + ".properties";
}
```