code: protected static final CompletableFuture<Tree> toCompletableFuture(Object object) {
  		if (object == null) {
  			return CompletableFuture.completedFuture(null);
  		}
  		if (object instanceof CompletableFuture) {
  			return ((CompletableFuture<?>) object).thenCompose(Promise::toCompletableFuture);
  		}
  		if (object instanceof Promise) {
  			return ((Promise) object).future;
  		}
  		if (object instanceof Throwable) {
  			CompletableFuture<Tree> future = new CompletableFuture<>();
  			future.completeExceptionally((Throwable) object);
  			return future;
  		}
  		if (object instanceof CompletionStage) {
  			return (((CompletionStage<?>) object).toCompletableFuture()).thenCompose(Promise::toCompletableFuture);
  		}
  		return CompletableFuture.completedFuture(toTree(object));
  	}
docs: Converts an Object to a (completed or uncompleted) CompletableFuture.
  
  @param object
  input Object
  @return object converted to CompletableFuture