How to fix TypeError: unsupported operand type(s) for |: 'type' and 'type' in Python | DevErrors