Added support for bsondocument