public static boolean isAttributeAvailable(String attributeName, String objectName) {

    try {
      ObjectName objName = new ObjectName(objectName);
      mbeanServer.getAttribute(objName, attributeName);
    } catch (MalformedObjectNameException | ReflectionException | MBeanException
        | InstanceNotFoundException | AttributeNotFoundException | NullPointerException e) {
      return false;
    }

    return true;

  }
Without special character transformation

@param regionPath region path
@return ObjectName MBean name
geode-core/src/main/java/org/apache/geode/management/internal/MBeanJMXAdapter.java