If we call a realm function from realm-web SDK passing any null parameter, we are getting the following errors.

While digging down the clearArgs function, it is found that as typeof null is object, it is throwing the above error. Definition of clearArgs is as follows:

I think this is a bug in realm-web. Otherwise, please help how to overcome this error.
Just to inform you that I am upgrading my app from MongoDB Stitch to MongoDB Realm and the same function was working in Mongodb Stich.