Change expect(Object) to be type safe