I need to define a foreign key constraint on some table B where a column ID must be in set of table A.ID **OR** it may be NULL (that would be valid value too). 

(A.ID column cannot be NULL at the same time).

Should I use CHECK clause?

UPD: Excuse me, I wrote wrong. I meant:

I need to define a foreign key constraint on some table B where a column ID must be in set of table A.ID **OR** it may be **zero** (that would be valid value too). 

(A.ID column cannot be **zero** at the same time).