fix issue when mimetype can be None