Type check the m_pShadingObj before assuming it's a stream.