create object if wrong type of id is passed when using upsert
Merge pull request #20 from robert52/master

create object if wrong type of id is passed when using upsert