Improved paramToObjectId