also, the ``if not something in`` is very weird, the normal convention is ``if something not in``. also, if doing type checking, please use ``isinstance``