Check for return value null before accessing object

* fixes a blank page on login if something with LDAP is broken and null instead of the user is returned

possible return values: https://github.com/owncloud/core/blob/master/apps/user_ldap/lib/user/manager.php#L136

I experienced this while trying to set up LDAP locally.