import pkg_resources


def get_package_version(pkg):
    """
    Get the version of the package.
    
    If the package version is unavailable, return ``None``.
    """
    try:
        return pkg_resources.get_distribution(pkg).version
    except pkg_resources.DistributionNotFound:
        return None