Added support for to_attr.