There is a `URI::regexp`. Maybe we could do `if location && (uri =~ URI::regexp)`.