Allow passing ObjectManager instance to DocumentType

Fixes #268