function isLayerGroup(layer) {
  return layer.isKindOfClass(MSLayerGroup.class()) && !layer.isKindOfClass(MSShapeGroup.class())
}
Checks if the layer is a layer group.

@param {MSLayer} layer
@returns {Boolean}