convert data type before update attr