def is_true(s):
    if isinstance(s, bool):
        return s
    elif isinstance(s, int):
        return s == 1
    elif isinstance(s, str):
        return s == '1' or s == 'True' or s == 'true'
    else:
        return TypeError('The type is not expected: {}'.format(type(s)))
