def to_time_sec(time_str):
    """
    Tries to convert `time_str` to a valid time non negative floating point number.

    Args:
        time_str (string): String representing non negative float - time 
                           in seconds.

    Returns:
        float: Time as non negative floating point number.

    Raises:
        ValueError: If `time_str` could not be converted to float or is less 
                    than 0.
    """

    try:
        time_float = float(time_str)
    except ValueError:
        raise ValueError("argument must represent a floating point number")
    if time_float < 0:
        raise ValueError("argument must be a non-negative floating point number")
    return time_float