- added EOM as first check prior to null check