@staticmethod
def val2bool(val):
    """
            Converts standard input to boolean values

            True:  'on',  '1', 1, True
            False: 'off', '0', 0, False
            """
    if isinstance(val, str):
        val = val.lower()
        if val == 'on' or val == '1':
            return True
        elif val == 'off' or val == '0':
            return False
        else:
            raise ValueError('Invalid input')
    return bool(val)
