code: public boolean isOptionalData() {
      if (cases == null || cases.length != 2)
        return false;
      return (cases[0] instanceof JSTuple) && ((JSTuple)cases[0]).getFieldCount() == 0;
    }
docs: Returns true if the variant represents the "optional data" design pattern
  (corresponding to an XSDParticle with minOccurs=0,maxOccurs=1 or to an Ecore
  EStructuralFeature with both isMany() and isRequired() false).