def str_to_bool(str):
    """Convert a unicode string to equivalent boolean value and is case insensitive."""
    if str.lower() == 'true':
        return True
    elif str.lower() == 'false':
        return False
    else:
        raise ValueError("{} in the app.config file is not a boolean value".format(str))