Added some tests to the redundant null check.