refactoring: simplify attribute resolution code

getString(id) would not return a blank string, it would raise an exception
if the given id was not found.