I don't know that it would ever be NULL, but I see that same test being done elsewhere in the code (eg ldapconnection CLdapClient::authorize).  Better safe than sorry, but I will remove it