from typing import List
from typing import Optional


def distance(v1: List[int], v2: List[int]) -> Optional[int]:
    """
    Determine the distance between two vectors, i.e. the number of positions in which their value differs.
    :param v1: first vector
    :param v2: second vector
    :return: distance as described above

    >>> distance([], [])
    0
    >>> distance([0, 1, 1], [1, 0, 1])
    2
    """
    if len(v1) != len(v2):
        return None
    return sum(1 if v1_n != v2_n else 0 for v1_n, v2_n in zip(v1, v2))