Add NPE check in Iron Engine

Closes #1420
Merge branch 'nightly' into marmot