src/Utility/DomainEntityBuilder.php
private function isMorhing($entity, $value)
    {
        if (!$entity instanceof ObjectEntity) {
            return false;
        }
       //String, numeric are fine
       if (!is_object($value)) {
           return false;
       }
       // if object has same type already (it's wierd, but ok)
       if (get_class($value) === $entity->getType()) {
           return false;
       }
       // we expect stdClass here only
       if (!$value instanceof \stdClass) {
           return false;
       }
        return true;
    }
private function isMorhing($entity, $value)
    {
        if (!$entity instanceof ObjectEntity) {
            return false;
        }
       //String, numeric are fine
       if (!is_object($value)) {
           return false;
       }
       // if object has same type already (it's wierd, but ok)
       if (get_class($value) === $entity->getType()) {
           return false;
       }
       // we expect stdClass here only
       if (!$value instanceof \stdClass) {
           return false;
       }
        return true;
    }
Returns true if value can be converted into domain model instance
@param AbstractEntity $entity
@param \stdClass $value
@return boolean