contentMimeType becomes null when Document is updated

I've created a document under Data and I am able to add and delete the files (I followed the example in
When the following script is run in Operations to update an attached Document, the contentMimeType gets updated from application/pdf to null.