Added check on properties

Added check on properties list has any elements, and in case it don't,
skip the agregation. It falis if the propertieList was empty
Merge pull request #7 from Tronhus/DocumentTypeFix

Added check on properties