Happens with certain functions in QtCore. Removing the null check in CSharpTextTemplate and run https://github.com/ddobrev/QtSharp to reproduce.