These || tests are a bit ugly I'm not a huge fan but I couldn't find a better way. Another approach which might be better but will take longer is to change the API from just set(index, object) to setInt(), setLong(), setFloat() etc and force the user to make the decision. I think this is cleaner overall and will also allow us to take native types (which upgrade automatically). I'll do this in a separately but leave this set() API for now.