Fixed the error checkings in line_interp and four_pnts_interp