Made custom filter optional for LDAP