We got this coding against the Hyland OnBase api. So code like this:
Core.FileTypes.Find(x);
Will work if x is “MS Word Document”, but if it is not a known type then x will be null. Passing x later into CreateStoreNewDocumentProperties(..) and then calling StoreNewDocument(..) gives us this lovely error above.