code: protected LayoutNodeType getLayoutNodeType(HttpServletRequest request, String folderNodeId) {
          final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
          final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager();
          final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager();
          final IUserLayoutNodeDescription node = userLayoutManager.getNode(folderNodeId);
  
          if (node == null) {
              return null;
          }
  
          return node.getType();
      }
docs: Verify the requested node exists in the user's layout. Also if the node exists see if it is a
  portlet node and if it is return the {@link IPortletWindowId} of the corresponding portlet.