checking if a variable belongs to a class in python,'b' in list(Foo.__dict__.values())