[encode] fix string implementation.

now, null has special means. encoder will ignore the field if string field is null.