code: public Object put(Object key, Object value)
      {
          if (null == key) throw new IllegalArgumentException("key must not be null");
          if (!(key instanceof String)) throw new IllegalArgumentException("key must be a String");
  
          if (!isValidObject(value))
          {
              if (value != null)
              {
                  throw new IllegalArgumentException("Invalid type of value.  Type: [" + value.getClass().getName() + "] with value: [" + value.toString() + "]");
              }
              else
              {
                  throw new IllegalArgumentException("Invalid type of value.");
              }
          }
          return super.put(key, value);
      }
docs: (non-Javadoc)
  @see java.util.HashMap#put(java.lang.Object, java.lang.Object)