diff --git a/src/Entity/AbstractEntity.php b/src/Entity/AbstractEntity.php
index <HASH>..<HASH> 100644
--- a/src/Entity/AbstractEntity.php
+++ b/src/Entity/AbstractEntity.php
@@ -441,10 +441,7 @@ abstract class AbstractEntity implements IEntity
 			}
 		}
 
-		if (!$metadata->isValid($value)) {
-			$class = get_class($this);
-			throw new InvalidArgumentException("Value for {$class}::\${$name} property is invalid.");
-		}
+		$this->validate($metadata, $name, $value);
 		$this->data[$name] = $value;
 		$this->modified[$name] = TRUE;
 	}
@@ -501,6 +498,22 @@ abstract class AbstractEntity implements IEntity
 
 
 	/**
+	 * Validates the value.
+	 * @param  PropertyMetadata $metadata
+	 * @param  string $name
+	 * @param  mixed $value
+	 * @throws InvalidArgumentException
+	 */
+	protected function validate(PropertyMetadata $metadata, $name, & $value)
+	{
+		if (!$metadata->isValid($value)) {
+			$class = get_class($this);
+			throw new InvalidArgumentException("Value for {$class}::\${$name} property is invalid.");
+		}
+	}
+
+
+	/**
 	 * @param PropertyMetadata $metadata
 	 * @return IProperty $property
 	 */
entity: extracted value validation into own method