Input validation in the Hermite spline function.