lazy_class: Avoid using  hasattr.