def str2bool(string):
    """It returns True, False or None"""
    if not string:
        return None
    if isinstance(string, (str,)):
        string = string.lower()
        options = ['none', 'null', 'nil']
        if string in options:
            return None
        options = ['false', 'f', 'no', '0']
        return not string in options
    return string
