check if a variable exists,"hasattr(obj, 'attr_name')"