wip
might be working
[runtime] Fix use before null-check crasher. Found by PVS Studio.