def get_timeout(val):
    """ convert the timeout value into a float or None """
    if val is None:
        return val
    timeout = float(val)
    if timeout <= 0:
        return None
    return timeout
