I changed to getattr() for these comparisons, but kept hasattr for places where we're simply checking for an attribute's existence -- I can change those as well if we shouldn't use it at all.