This would error out on `url.indexOf` if `url` is not defined, as far as I can tell. Should probably group `instanceof` and `indexOf` check together.