diff --git a/modules/core/lib/Auth/Process/StatisticsWithAttribute.php b/modules/core/lib/Auth/Process/StatisticsWithAttribute.php
index bb4395eacb3b1ffa1db8ea84c1a528ca9747c623..c8f876075d6996afdb3b1b38d879e3dd42f7eb06 100644
--- a/modules/core/lib/Auth/Process/StatisticsWithAttribute.php
+++ b/modules/core/lib/Auth/Process/StatisticsWithAttribute.php
@@ -38,7 +38,7 @@ class sspmod_core_Auth_Process_StatisticsWithAttribute extends SimpleSAML_Auth_P
 		
 		if (array_key_exists('type', $config)) {
 			$this->typeTag = $config['type'];
-			if (!is_string($this->attribute)) {
+			if (!is_string($this->typeTag)) {
 				throw new Exception('Invalid typeTag given to core:StatisticsWithAttribute filter.');
 			}
 		}