adding a few sanity checks before LSQSpline