You can't check for null with typeof in js, because typeof(null) returns "object"
So use if( typeof pl[i] != 'number' && pl[1] !== null) here
https://github.com/flexdash/node-red-fd-corewidgets/blob/c874ac3212c6d7f2b0189357b61263c3a14e132d/custom/time-plot.js#L56C1-L56C1