def get_task_version(taskf):
    """return a version for a taskf.

    This is wrapper around taskf.get_version() that will not raise
    an exception if a tool is not installed but will return None
    instead.
    """
    try:
        version = taskf().get_version()
    except Exception as ex:
        msg = str(ex)
        if msg.startswith("no version defined for"):
            raise ValueError(msg)
        elif "non-zero exit status" in msg:
            # if tool can not be found, that is ok
            return None
        elif "not found" in msg:
            return None
        else:
            raise ValueError("version check failed with: {}".format(msg))

    return version