diff --git a/src/main/java/org/olat/shibboleth/util/ShibbolethHelper.java b/src/main/java/org/olat/shibboleth/util/ShibbolethHelper.java
index 76f9067b2bd944989f54b50c0a3aaf14571998bd..3c6ff18be57472d8ea9d9198dd590ce3c14fd4ea 100644
--- a/src/main/java/org/olat/shibboleth/util/ShibbolethHelper.java
+++ b/src/main/java/org/olat/shibboleth/util/ShibbolethHelper.java
@@ -37,8 +37,11 @@ public class ShibbolethHelper {
 	 */
 	public static String getFirstValueOf(String attributeName, Map<String, String> shibbolethAttributesMap) {
 		String attrVal = shibbolethAttributesMap.get(attributeName);
-		ShibbolethAttribute multivalueShibbAttributeEmail = new ShibbolethAttribute(attributeName, attrVal);
-		return multivalueShibbAttributeEmail.getFirstValue();	
+		if (attrVal != null) {
+			ShibbolethAttribute multivalueShibbAttributeEmail = new ShibbolethAttribute(attributeName, attrVal);
+			return multivalueShibbAttributeEmail.getFirstValue();
+		}
+		else return null;
 	}
 
 }