Handle objects and arrays in assertEqual