code: public boolean hasAnyFavorites(IUserLayout layout) {
          Validate.notNull(layout, "Cannot determine whether a null layout contains favorites.");
  
          // (premature) performance optimization: short circuit returns true if nonzero favorite
          // portlets
          return (!getFavoritePortletLayoutNodes(layout).isEmpty()
                  || !getFavoriteCollections(layout).isEmpty());
      }
docs: True if the layout contains any favorited collections or favorited individual portlets, false
  otherwise.
  
  @param layout non-null user layout that might contain favorite portlets and/or collections
  @return true if the layout contains at least one favorited portlet or collection, false
  otherwise
  @throws IllegalArgumentException if layout is null