diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php
index bcfcd5dd21909b102c569acf5839ca78f640d48d..95c68b6337091d031f7357b89973f70fe4350a4b 100644
--- a/apps/workflowengine/lib/Service/RuleMatcher.php
+++ b/apps/workflowengine/lib/Service/RuleMatcher.php
@@ -24,12 +24,9 @@ declare(strict_types=1);
 
 namespace OCA\WorkflowEngine\Service;
 
-use OCA\WorkflowEngine\AppInfo\Application;
-use OCA\WorkflowEngine\Entity\File;
 use OCA\WorkflowEngine\Helper\ScopeContext;
 use OCA\WorkflowEngine\Manager;
 use OCP\AppFramework\QueryException;
-use OCP\Files\Node;
 use OCP\Files\Storage\IStorage;
 use OCP\IL10N;
 use OCP\IServerContainer;
@@ -128,7 +125,7 @@ class RuleMatcher implements IRuleMatcher {
 				list($entity, $subject) = $entityInfo;
 				$checkInstance->setEntitySubject($entity, $subject);
 			}
-		} else {
+		} else if(!$checkInstance instanceof ICheck) {
 			// Check is invalid
 			throw new \UnexpectedValueException($this->l->t('Check %s is invalid or does not exist', $check['class']));
 		}
diff --git a/lib/public/WorkflowEngine/IEntityCheck.php b/lib/public/WorkflowEngine/IEntityCheck.php
index 7a4df0afd5f44403ca6f7d681f4b55ad148a852a..d90535b4c999317dd1ae8d36e3599aaf3d88122b 100644
--- a/lib/public/WorkflowEngine/IEntityCheck.php
+++ b/lib/public/WorkflowEngine/IEntityCheck.php
@@ -24,9 +24,6 @@ declare(strict_types=1);
 
 namespace OCP\WorkflowEngine;
 
-
-use OCP\Files\Storage\IStorage;
-
 /**
  * Interface IFileCheck
  *