The conversion to string I believe is not needed as field.type is already a string.