check if the url is valid