check if object `obj` has attribute 'attr_name',"hasattr(obj, 'attr_name')"