Encoder: Add proper type conversion according to schema field types