Fix for cases where the mime type is not recognized or the DB outputs error message as mime type.