The rest of the code uses `(ip != NULL)` for this test. I am indifferent to which is used, except that it should be consistent.