NXP-12193: add an option to check the allowed sub types when creating a document; default to true