Add type conversion for fields