IsLeaf converted to enum with HowToGenerate