Add some type conversion for DML