Hi Paolo,
If the input is with 0.4V of ground the output is undefined. (See page 7 of the datasheet.) The output of the ADC is probably going to 0x8000 or 0x7FFF which would translate to the high or low temperature.
The LMP90079 should be able to detect if the TC is shorted to ground. The Burn Out Current needs to be enabled and scan mode set to ScanMode3. You will need to monitor RAILS_FLAG. If this bit is set to 1 then that indicates that the input is within 50mV of ground or the supply.
Mike