private function getObjectStateFilterCriteria(ParameterCollectionInterface $parameterCollection): ?Criterion
    {
        if ($parameterCollection->getParameter('filter_by_object_state')->getValue() !== true) {
            return null;
        }

        $objectStates = $parameterCollection->getParameter('object_states')->getValue() ?? [];
        if (count($objectStates) === 0) {
            return null;
        }

        $criteria = [];
        foreach ($this->getObjectStateIds($objectStates) as $stateIds) {
            $criteria[] = new Criterion\ObjectStateId($stateIds);
        }

        return new Criterion\LogicalAnd($criteria);
    }