import six


def string_to_bool(possible_bool_string):
    """
    ensures a bool

    :param possible_bool_string: might be string, unicode or bool
    :return: bool
    """
    if isinstance(possible_bool_string, bool):
        return possible_bool_string
    if isinstance(possible_bool_string, (str, six.text_type)):
        return str(possible_bool_string) \
            .replace("'", "", -1) \
            .replace('"', '', -1) \
            .lower() == 'true'
    return False