guard against nil
add net-ldap encoding patch