Re #5983. Check if sample is null.
Re #5983. Correct spelling mistakes.
Merge remote-tracking branch 'origin/bugfix/5983_simple_instrument_crash'