docs: private static File checkInstance(Scriptable obj) {
          if (obj == null || !(obj instanceof File)) {
              throw Context.reportRuntimeError("called on incompatible object");
          }
          return (File) obj;
      }