Comparing Two Values when one or more could be NULL I am writing a trigger and want to see if one column has changed could be NULL and trying to avoid the following:

IF     NEW.value != OLD.value 
    OR (NEW.value IS NULL AND OLD.value IS NOT NULL) 
    OR (NEW.value IS NOT NULL AND OLD.value IS NULL) THEN
...
END IF;


This is postgres 9.5 in a function (stored procedure)
Equivalent and simpler:

IF  NEW.value IS DISTINCT FROM OLD.value  THEN
...
END IF;