Fixed several issues

- Added missing initialization of variable facets and a new method hasfacets in class Document
- Fixed several methods in class PropertiesHelper to avoid irrelevant IllegalArgumentException exceptions