Fixed PHP-554: MongoId should not get constructed when passing in an inv...

...alid ID.