Note that it _is_ an error if this returns `nil` (because it means `str` was not `nil` and could not be converted into a URL).