from typing import Tuple
from typing import Union


def read_next_token(line: str, pos: int) -> Tuple[Union[str, None], int]:
  """Read next token from line.

  Args:
    line: line.
    pos: current position.

  Returns:
    Token (None if not found) and current position.
  """
  while pos < len(line) and line[pos].isspace():
    pos += 1

  if pos >= len(line):
    return None, pos

  initial_pos = pos
  while pos < len(line) and not line[pos].isspace():
    pos += 1
  return line[initial_pos:pos], pos