public function validate($entity, $entityName = null)
    {
        $entityName = $entityName ?: 'root';

        // Validate root type
        $this->validateType($entity, $this->schema, $entityName);

        return $this;
    }