DocumentObjectMapper.getObjectFromDocument refactoring