The contents of the array must match its definition.
Change the type of objects that the array stores, or do not attempt to store that type of object in the array.