def string_to_bool(s, default=False):
    """
    Turns a string into a bool, giving a default value preference.
    """
    if len(str(s).strip()) == 0:
        return default

    if default:
        if s[0].upper() == "F":
            return False
        else:
            return True
    else:
        if s[0].upper() == "T":
            return True
        else:
            return False