public boolean hasFacetOfType(final @Nullable FacetInfo parent, final FacetTypeId typeId) {
    final List<FacetInfo> list = getChildren(parent);
    for (FacetInfo info : list) {
      if (info.getFacetType().getId() == typeId) {
        return true;
      }
    }
    return false;
  }
public boolean hasFacetOfType(final @Nullable FacetInfo parent, final FacetTypeId typeId)