[Minor] modified how objects are added to the ObjectFilter

Now objects are not added by their class names, but the type is
retrieved from the object reference