Assuming you have such an invalid point at position n: do you want to have a connecting line between the points n-1 and n+1 or is the curve supposed to stop at n-1 restarting ar n+1 ?
Do you have symbols ?

Uwe