why not `if (typeof proxy !== "string")` instead?