If COLLECTIONS-398-2.patch is applied (see COLLECTIONS-398) then the underlying code will support nulls.

The null check in add() would obviously have to be disabled to allow null entries.

Two possible approaches:
- remove the restriction that nulls are not allowed; this would be a change in behaviour so might not be acceptable
- add new ctors with a boolean parameter to specify whether nulls are allowed.