Perhaps just doing:

`var generatedId = _getIccContactId(theContact);`
`if (generatedId) theContact.id = generatedId;`