How to fix BadValue: invalid parameter in MongoDB | DevErrors