I'd just go for `URI.create(url.toString())` probably; added benefit that it fails fast if it's null.