Add some guards against invalid references
Add some guards against invalid references

In the PipelineModel, check that QModelIndex parameters are valid
before attempting to access the possibly null associated
TreeItem. Also, check that any TreeItem accessed from the QModelIndex
is not null before attempting to call member functions.

cjh1/tomviz,cryos/tomviz,cryos/tomviz,cryos/tomviz,OpenChemistry/tomviz,thewtex/tomviz,mathturtle/tomviz,thewtex/tomviz,mathturtle/tomviz,OpenChemistry/tomviz,cjh1/tomviz,OpenChemistry/tomviz,cjh1/tomviz,OpenChemistry/tomviz,mathturtle/tomviz,thewtex/tomviz