Small change to addItem of AbstractValueCollection

The key of the addItem now must be null, string or an int. Other values
aren't valid