1. solve the hanging problem if the retrieved object is not an valid type T.
2. add bson object id exception handling
Merge pull request #10 from tianjianfeng/issue-9

fix issues 3, 4, 5