Better empty node check