LDAP: check array with isset first to avoid warnings about undefined ind...

...ex

Fixes the warnings stated in https://github.com/owncloud/core/issues/1664