fix: null/undefined check for global tool history checks
fix: null/undefined check for global tool history checks

cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,chafey/cornerstoneTools