from typing import Optional


def get_major_minor_version(module) -> Optional[float]:
    """Return a float of the major.minor version release of module or None."""
    try:
        version = float(".".join(module.__version__.split(".")[:2]))
    except AttributeError:
        version = None
    return version