Fix: AttributeError when no mime type is found