Java boolean allows values of true and false while Boolean allows true, false, and null. I have started to convert my booleans to Booleans. This can cause crashes in tests such as
Boolean set = null;
...
if (set) ...
while the test
if (set != null && set) ...
seems contrived and error-prone.
When, if ever, is it useful to use Booleans with null values? If never, then what are the main advantages of the wrapped object?