def check_type(value, tipo='boolean'):
    """
    Check if some value is on trues or falses, so
    if the value is in a set, give us the correct boolean

    """
    trues = {'true', 't', 'T', 'True', 'verdadero', '1', 's', 'S', 'Si',
        'si', 1, True}
    falses = {'falso', 'false', 'False', 'f', '0', 'n', 'N', 'No', 'no', '',
        0, False, None}
    if tipo == 'int':
        value = int(value)
    elif tipo == 'boolean':
        if value in trues:
            value = True
        elif value in falses:
            value = False
        else:
            value = False
    elif tipo in {'double', 'float', 'real'}:
        value = float(value)
    return value
