improved exception message in NodeType class