String to array addUniq() problem

Trying to read a comma separated string from db, convert to array for manipulation and then save back to db as comma separated string.

app connect : <dmx-array id="types" dmx-bind:items="getTaskDetails.data.task.types.split(',')"></dmx-array>

Seems fine, Displays like it should when outputting the array values to an input field. Array count gives the correct value

Repeat over the array using dmx-repeat. Add and remove values from it using checkboxes
dmx-on:change="types.items.contains(id) ? types.remove(id) : types.addUniq(id)"

Works fine if i start out with an empty array. But if its populated by the split string i get duplicates.
Checkbox checked does not work either when using types.items.contains().

Seems like the string split does not really create an array ?
Am I missing something obvious ?

Try toNumber() or toString() formatters on the values.