Is it possible to enforce unique values in a column, excluding nulls?
You can create a unique filtered index as below.

CREATE UNIQUE NONCLUSTERED INDEX IX ON TableA(TableBID) WHERE TableBID IS NOT NULL


For versions of SQL Server prior to filtered index support (pre 2008) see this related question.