Updated ming provider to avoid InvalidId exception

Added InvalidId exception catch to avoid exception raising on wrong _id
Fixed ObjectId cast, added tests
Merge pull request #1 from devilicecream/patch-1

Updated ming provider to avoid InvalidId exception