`$escape = $attr->getValue()->getEscaping()->isEnabled();` might work, too