I wanted to check if a field has a "null" value. If so, I wanted to replace the "null" with a NULL value. This works for normal fields:
SELECT NULLIF(JSON_DATA:"TO_Creator"::string, 'null') as "TO_CREATOR" FROM TABLE
However, it doesn't work with timestamps :
NULLIF(JSON_DATA:"TO_Collected_Date_Time"::timestamp_ntz, 'null') as "TO_COLLECTED_DATE_TIME",
This would later throw errors that:
SQL Error [100035] [22007]: Timestamp 'null' is not recognized
How can I check the same thing for NULL values within the timestamp field too?