Use getattr for objects