code: public static boolean hasClientBehavior(String eventName,
              Map<String, List<ClientBehavior>> behaviors,
              FacesContext facesContext)
      {
          if (behaviors == null)
          {
              return false;
          }
          return (behaviors.get(eventName) != null);
      }
docs: Checks if the given component has a behavior attachment with a given name.
  
  @param eventName the event name to be checked for
  @param behaviors map of behaviors attached to the component
  @return true if client behavior with given name is attached, false otherwise
  @since 4.0.0