added assert to make sure thre's no empty values when visiting all the
nodes looking for NaN