code: private final Object typeCheck(Object value, int type) {
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              SibTr.debug(this, tc, "typecheck: value = " + value + ", " + value.getClass() + " , type=" + type);
  
          switch (type) {
  
          /* No checking, just return the value */
              case Selector.UNKNOWN:
                  return value;
  
                  /* STRING - simple! */
              case Selector.STRING:
                  return (value instanceof String) ? value : null;
  
                  /* BOOLEAN - Boolean or BooleanValue are suitable */
              case Selector.BOOLEAN:
                  return (value instanceof Boolean) ? value : null;
  
                  /* Any numeric - any Number or a NumericValue are suitable */
              default:
                  return (value instanceof Number) ? value : null;
          }
      }
docs: Check the type of the value obtained from the message.
  
  The value is returned as is if it is of the correct
  type, otherwise null is returned.
  
  @param value The Object value retrieved from the message
  @param type The expected SelectorType of the value.
  
  @return Object Either the original Object value, or null if the type of
  value was not correct.