How can we get the colorspace of an ImageMask?

Q: How can we get the colorspace of an ImageMask?
------------
A: If image.IsImageMask() returns true, the image is not supposed to
contain a ColorSpace entry because sample values represent masking
properties (1 bit per sample) rather than colors. You can use
image.IsImageMask() to identify image color mask and avoid calling
image.GetImageColorSpace() (which may return null or throw an
exception).