fix(examples): resolve nil pointer dereference (#1663)