@Override
  public boolean evaluate(Resource resource) {
    String propertyId = getPropertyId();

    // If the property exists as a Map then check isEmpty
    Object value = resource.getPropertyValue(propertyId);
    if (value instanceof Map) {
      Map<?,?> mapValue = (Map) value;
      return mapValue.isEmpty();
    }
    // Get the category
    Map<String, Object> properties = resource.getPropertiesMap().get(propertyId);
    return properties == null ? true : properties.isEmpty();
  }
Predicate that checks if the associated property category is empty.  If the associated
property id references a Map property then treat the Map as a category.
ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/CategoryIsEmptyPredicate.java