We use NaN for masking in image processing, for instance for filtering out defective pixels. If a pixel has value NaN, it is ignored across the board.