Adds option to putObject() to check if the object was already there

For my use case this was necessary, and maybe it's a nice option for everybody to have.