`if val is not True:` -> `if not val:`