diff --git a/lib/Auth/Process/ComputeLoA.php b/lib/Auth/Process/ComputeLoA.php
index 1b1116474c278e7dc67d8c58c65375bab377ae4a..c1f542a0f213c6bbcf037a684037c20c77bab274 100644
--- a/lib/Auth/Process/ComputeLoA.php
+++ b/lib/Auth/Process/ComputeLoA.php
@@ -40,7 +40,7 @@ class ComputeLoA extends \SimpleSAML\Auth\ProcessingFilter
     {
         parent::__construct($config, $reserved);
 
-        if (isset($config['attrName'])) {
+        if (!empty($config['attrName'])) {
             $this->attrName = $config['attrName'];
         } else {
             $this->attrName = self::DEFAULT_ATTR_NAME;
@@ -51,13 +51,13 @@ class ComputeLoA extends \SimpleSAML\Auth\ProcessingFilter
     {
         assert('is_array($request)');
 
-        if (isset($request['Attributes'][$this->attrName])) {
+        if (!empty($request['Attributes'][$this->attrName])) {
             return;
         }
         $this->metadata = MetaDataStorageHandler::getMetadataHandler();
         $sourceIdpMeta = $this->metadata->getMetaData($request['saml:sp:IdP'], 'saml20-idp-remote');
 
-        if (isset($sourceIdpMeta['EntityAttributes']['http://macedir.org/entity-category'])) {
+        if (!empty($sourceIdpMeta['EntityAttributes']['http://macedir.org/entity-category'])) {
             $entityCategoryAttributes = $sourceIdpMeta['EntityAttributes']['http://macedir.org/entity-category'];
         } else {
             Logger::error('cesnet:ComputeLoA - There are no element with name \'EntityAttributes\' '
@@ -66,7 +66,7 @@ class ComputeLoA extends \SimpleSAML\Auth\ProcessingFilter
             $entityCategoryAttributes = [];
         }
 
-        if (isset($request['Attributes']['eduPersonScopedAffiliation'])) {
+        if (!empty($request['Attributes']['eduPersonScopedAffiliation'])) {
             $this->eduPersonScopedAffiliation = $request['Attributes']['eduPersonScopedAffiliation'];
         } else {
             Logger::error(