Check LDAP attribute exists before accessing it.