title: NullPointerException on save in DynamoDB
body: <p>I have a <code>User</code> entity with an <code>id</code></p>
  
  <pre><code>@DynamoDBTable(tableName = "User")
  public class User {
    ...
    @DynamoDBHashKey(attributeName = "id")
    @DynamoDBAutoGeneratedKey
    public String getId() {
      ...
    }
    // other attributes, getters and setters omitted for simplicity
    ...
  }
  </code></pre>
  
  <p>and a <code>User</code> Table with key name <code>id</code> of type <code>S</code></p>
  
  <pre><code>final ArrayList&lt;KeySchemaElement&gt; keySchema = new ArrayList&lt;KeySchemaElement&gt;();
  keySchema.add(new KeySchemaElement().withAttributeName(pKeyName).withKeyType(KeyType.HASH));
  final ArrayList&lt;AttributeDefinition&gt; attributeDefinitions = new ArrayList&lt;AttributeDefinition&gt;();
  attributeDefinitions.add(new AttributeDefinition().withAttributeName(pKeyName).withAttributeType(pKeyType));
  final CreateTableRequest request = new CreateTableRequest().withTableName(pTableName).withKeySchema(keySchema)
              .withProvisionedThroughput(new ProvisionedThroughput().withReadCapacityUnits(10L).withWriteCapacityUnits(5L));
  request.setAttributeDefinitions(attributeDefinitions);
  </code></pre>
  
  <p>on doing a 'save' operation</p>
  
  <pre><code>public &lt;S extends User&gt; S save(final S pUser) {
      mapper.save(pUser);
      return pUser;
  }
  </code></pre>
  
  <p>I get a NullPointerException from within the DBMapper code</p>
  
  <pre><code>java.lang.NullPointerException: null
  at com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper$SaveObjectHandler.doPutItem(DynamoDBMapper.java:883) ~[aws-java-sdk-dynamodb-1.11.295.jar!/:na]
  ...
  at com.amazonaws.services.dynamodbv2.datamodeling.AbstractDynamoDBMapper.save(AbstractDynamoDBMapper.java:123) ~[aws-java-sdk-dynamodb-1.11.295.jar!/:na]
  at hello.user.repository.UserRepository.save(UserRepository.java:85) ~[classes!/:0.1.0]
  </code></pre>
  
  <p>My user object is not <code>null</code>, nor are any of its attributes other than the <code>id</code> which is autogenerated. Any idea what's going on?</p>
  
  <p>Is the null id causing the exception? Is this not how I should expect <code>@DynamoDBAutoGeneratedKey</code> to work? According to the documentation and example at
  <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.Annotations.html#DynamoDBMapper.Annotations.DynamoDBAutoGeneratedKey" rel="nofollow noreferrer">https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.Annotations.html#DynamoDBMapper.Annotations.DynamoDBAutoGeneratedKey</a>
  this should be how it works</p>