fix bug: check unique fails when the field is not string