Extract isURL helper function.

Consolidates the http(s) testing.