url.isValidUrl function, tests, used in Request ctor