private function setNullsPosition($nullsPosition)
    {
        if (!\in_array($nullsPosition, [self::NULLS_FIRST, self::NULLS_LAST])) {
            throw new \InvalidArgumentException('Invalid nulls position: ' . $nullsPosition);
        }

        $this->nullsPosition = $nullsPosition;

        return $this;
    }