code: protected <T> Optional<T> getUserData(Optional<? extends Node> node, Class<T> type) {
          if (node.isPresent()) {
              final Node n = node.get();
              return getValue(n, n::getUserData, type);
          }
          return Optional.empty();
      }
docs: Gets the user data.
  
  @param node the node
  @param type the cls
  
  @param <T> the generic type
  
  @return the user data