Checking the validity of the url provided.