more flexible text mimetype checking