added asserts for `mime_type`.