'Converts \'something\' to boolean. Raises exception for invalid formats
Possible True  values: 1, True, "1", "TRue", "yes", "y", "t"
Possible False values: 0, False, "0", "faLse", "no", "n", "f", 0.0'

@staticmethod
def to_bool(value):

    val = str(value).lower()
    if (val in ('yes', 'y', 'true', 't', '1')):
        return True
    elif (val in ('no', 'n', 'false', 'f', '0', '0.0')):
        return False
    else:
        return None
