CompletableFuture<Type> (@NotNull Type subType, Function<? super Type, ? extends CompletableFuture<Boolean>> checker) { CompletableFuture<Type> res = new CompletableFuture<>(); findAnyBaseType(subType, checker, res).thenRun(() -> res.complete(null)); return reschedule(res); }