Check ldap connection before save