def _convert_to_bool(value):
    """
    If the value is `true` or `false`, return the boolean equivalent form of
    the value. This method is case insensitive.

    :param value: the string value
    :type value: str
    :return: the string value or the boolean value
    :rtype: str or bool
    """
    if isinstance(value, str):
        lower_value = value.lower()
        if lower_value == "true":
            value = True
        elif lower_value == "false":
            value = False
    return value