fix a bug where empty nodes would result in an array
empty node should return null instead of empty string