added further checks to cover missing/non-existant attributes