private function peek(array $charArray, int $currPosition)
    {
        $charArrayLength = count($charArray);

        if ($charArrayLength === 0 || $charArrayLength === $currPosition + 1) {
            return null;
        }

        return $charArray[$currPosition + 1];
    }