def is_bool_true(my_var, do_define_check=True):
    """Check variable value can be converted to boolean True

    Case-insensitive input value of True, yes or 1 is treated as boolean True.
    """
    if do_define_check:
        try:
            my_var
        except NameError:
            my_var = None
    if my_var and type(my_var) == type(True):
        return my_var
    else:
        return my_var and my_var.strip().lower() in ['yes', 'true', '1', 'on']