code: public static AttributeValue toAttributeValue(Object value) {
          AttributeValue result = new AttributeValue();
          if (value == null) {
              return result.withNULL(Boolean.TRUE);
          } else if (value instanceof Boolean) {
              return result.withBOOL((Boolean)value);
          } else if (value instanceof String) {
              return result.withS((String) value);
          } else if (value instanceof BigDecimal) {
              BigDecimal bd = (BigDecimal) value;
              return result.withN(bd.toPlainString());
          } else if (value instanceof Number) {
              return result.withN(value.toString());
          } else if (value instanceof byte[]) {
              return result.withB(ByteBuffer.wrap((byte[]) value));
          } else if (value instanceof ByteBuffer) {
              return result.withB((ByteBuffer) value);
          }
docs: Converts a simple value into the low-level <code><AttributeValue/code>
  representation.
  
  @param value
  the given value which can be one of the followings:
  <ul>
  <li>String</li>
  <li>Set&lt;String></li>
  <li>Number (including any subtypes and primitive types)</li>
  <li>Set&lt;Number></li>
  <li>byte[]</li>
  <li>Set&lt;byte[]></li>
  <li>ByteBuffer</li>
  <li>Set&lt;ByteBuffer></li>
  <li>Boolean or boolean</li>
  <li>null</li>
  <li>Map&lt;String,T>, where T can be any type on this list but must not
  induce any circular reference</li>
  <li>List&lt;T>, where T can be any type on this list but must not induce
  any circular reference</li>
  </ul>
  @return a non-null low level representation of the input object value
  
  @throws UnsupportedOperationException
  if the input object type is not supported