Checks if URL is valid.