fix null reference errors
fix null reference errors

xieguigang/MassSpectrum-toolkits,xieguigang/MassSpectrum-toolkits,xieguigang/spectrum,xieguigang/MassSpectrum-toolkits,xieguigang/MassSpectrum-toolkits,xieguigang/spectrum