public function isRegisteredEntity($entity)
    {
        if (!is_string($entity)) {
            $entity = get_class($entity);
        }

        return array_key_exists($entity, $this->entityClasses);
    }