How to get the mimeType of a RichTextField from a Form?

I want to dynamically assign a widget to a RichTextField depending on its mimeType.

I have the following questions:

  1. should I do it in the updateWidgets or in the update method of the form?
  2. is it right to check if the field is a RichTextField with self.fields['my_richtext'].field.schema.__identifier__ == 'plone.app.textfield.interfaces.IRichTextValue' or is there a better way?
  3. how do I get the mimeType of the field/widget/value?
def updateWidgets(self, prefix=None):
    super(EditForm, self).updateWidgets()
    if self.fields['my_richtext'].field.schema.__identifier__ \
            == 'plone.app.textfield.interfaces.IRichTextValue':
        # check here the "mimeType":
        self.fields["my_richtext"].widgetFactory = MyFieldWidget
        z3c.form.form.Form.updateWidgets(self)