BS-9610: don't call setFile on a document if the value is not specified