Added sanity checks to PiecewiseParsedFunction