Change ArrayCollection to Collection fo the instanceOf test. This created a problem when the object was type PersistanceCollection