Fixed empty node check so that 0 (zero) is accepted.