Set up function to check if a string is a URL.