Express attribute get value

I have created a simple express object, everything went fine.
Then I try to get the value of an attribute of type radio list. When I echo the value with
echo $entry->getAttribute('my_attribute');
It display my attribute value
But when I try to return this value, it send me an object.
How can I retrieve this type of attribute value to set, let say, an array value?
Thanks for your help

Most attributes have a built in string function, so you may be able to do (string)$attr->getValue() or ‘’.$attr->getValue().

Hello John The Fish,
Thanks for that.
Indeed, this works like a charm:
(string) $entry->getAttribute('my_attribute')->getValue()
Have a good evening (morning, day?)