A FOREIGN KEY is not enforced on a NULL value, so you just need to make sure that only one of them is non-NULL:
CHECK (
(ParentUnitID IS NOT NULL AND ParentAddressID IS NULL)
OR (ParentUnitID IS NULL AND ParentAddressID IS NOT NULL)
)
If you happen to use MySQL, you'll need to implement this as a trigger, since MySQL doesn't enforce CHECK constraints.
Alternatively, you could use inheritance, as described here.