Ensure a str is is passed to urlparse