Simplify code by adding adefault value to GetAttribute