code: public static <C> void objectToDataCollection(Collection<C> objectCollection, Collection<Data> dataCollection,
                                                    SerializationService serializationService, String errorMessage) {
          for (C item : objectCollection) {
              checkNotNull(item, errorMessage);
              dataCollection.add(serializationService.toData(item));
          }
      }
docs: Converts a collection of any type to a collection of {@link Data}.
  
  @param objectCollection     object items
  @param dataCollection       data items
  @param serializationService will be used for converting object to {@link Data}
  @param errorMessage         the errorMessage when an item is null
  @throws NullPointerException if collection is {@code null} or contains a {@code null} item