import importlib


def check_optional_package_presence(pkg_name):
    """Returns true if the given package name is available, false otherwise."""
    try:
        importlib.import_module(pkg_name)
    except ImportError as e:
        if pkg_name in e.msg:
            return False
    return True