added explicit check for ObjectNode document type