add failsave npe checks
Merge remote-tracking branch 'remotes/origin/Dev' into Dev