Updated for new PEP8 standards using '<item> not in <object>' and '<object> is not None' instead of 'not <item> in <object>' and 'not <object> is None'.