hasattr() is better than getattr(..., None).