make sure the mimetype has a valid format before checking it. closes #1302