_id type coerncion in the presence of document structure