def str2bool(value):
    """ Type to convert strings to Boolean (returns input if not boolean) """
    if not isinstance(value, str):
        return value
    if value.lower() in ('yes', 'true', 'y', '1'):
        return True
    elif value.lower() in ('no', 'false', 'n', '0'):
        return False
    else:
        return value