Detecting and adjusting for non‐linearities in calibration of near‐infrared data using principal components