Pointer check against null; gitignore update for examples