checking the url is valid