Improoved on av "get attribute value" function

The function could be restructured. The break would be superflous.