function isPointNull(p) {
    return isNaN(p[0]) || isNaN(p[1]);
}
Draw smoothed line in non-monotone, in may cause undesired curve in extreme
situations. This should be used when points are non-monotone neither in x or
y dimension.