This ports one more function away from needing to use the awkward valid state of the URL class.
verify_cast
as