Properly protecting against undefined node attribute