not sure why this is needed at all.
Just pass update a Object of Numbers like:

<code>
thing.update({
 7: 0xff
})
<code>

then there is no need for conversion.

Maybe I'm missing something ;)