Added null checking for shibboleth authentication