trace: avoid "is" with a literal Python 3.8 warnings