code: protected void enforcePrimitive(Object t) throws ClassCastException {
          if (!JsonValue.checkType(t)
                  || t instanceof JsonValue) {
              throw new ClassCastException("Only primitive types are supported in CouchbaseArraySet, got a " + t.getClass().getName());
          }
      }
docs: Verify that the type of object t is compatible with CouchbaseArraySet storage.
  
  @param t the object to check.
  @throws ClassCastException if the object is incompatible.