Improve getAttribute() to return info when none match