private static CompletableFuture<Boolean> instanceOf(@Nullable Type subType, @NotNull String superType, boolean reschedule) {
    if (!isAsyncEnabled()) {
      return completedFuture(DebuggerUtils.instanceOf(subType, superType));
    }

    if (subType == null || subType instanceof VoidType) {
      return completedFuture(false);
    }

    if (subType instanceof PrimitiveType) {
      return completedFuture(superType.equals(subType.name()));
    }

    if (CommonClassNames.JAVA_LANG_OBJECT.equals(superType)) {
      return completedFuture(true);
    }

    CompletableFuture<Boolean> res = new CompletableFuture<>();
    instanceOfObject(subType, superType, res).thenRun(() -> res.complete(false));
    if (!reschedule) {
      return res;
    }
    return reschedule(res);
  }
private static CompletableFuture<Boolean> instanceOf(@Nullable Type subType, @NotNull String superType, boolean reschedule)