Check hasattr() first