code: public static Map<UUID, Long> getCoreNonNullAttributes(Map<UUID, Long> attributes) {
          return attributes.entrySet().stream()
                           .filter(e -> Attributes.isCoreAttribute(e.getKey()) && e.getValue() != NULL_ATTRIBUTE_VALUE)
                           .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
      }
docs: Returns a new Map of Attribute Ids to Values containing only those Core Attributes from the given Map that do not
  have a null value.
  
  @param attributes The Map of Attribute Ids to Values to filter from.
  @return A new Map containing only Core Attribute Ids and Values (from the original map).