Check if URL is valid