Firebird 2.0 and up
In Firebird 2 and higher, you test for nullencompassing equality with DISTINCT
.This has already been discussed, but here’s a quick recap.Two expressions are considered:

DISTINCT
if they have different values or if one of them isNULL
and the other isn’t; 
NOT DISTINCT
if they have the same value or if both of them areNULL
.
[NOT] DISTINCT
always returns true
or false
, never NULL
or something else.Examples:
if (A is distinct from B) then...
if (Buyer1 is not distinct from Buyer2) then...
Skip the next section if you’re not interested in the preFirebird2 stuff.