From @fwinkl :
m_athenaTool.typeAndName() != "IPythia8Custom"
But typeAndName() is probably "IPythia8Custom/IPythia8Custom". However, I recommend you change the code and use an empty ("") ToolHandle by default. Then simply check via
if (not m_athenaTool.empty()) ...
The code is clearly trying to create a tool of type IPythia8Custom, which itself is an abstract interface. This cannot work.
Thanks also to @ewelina.