Fixing foodcritic violation FC019

  FC019: Access node attributes in a consistent manner