base::attr with a default value instead of NULL, and always exact
attr(x, which, default_value = "", exact = TRUE)
an object whose attributes are to be accessed.
a non-empty character string specifying which attribute is to be accessed.
value to return when object x has no attribute which
logical: should which
be matched exactly?