LearnBoost/mongoose — comment on commit 605c3a0a865650e75e0240896da3be64c5ac82fc
File:  line 0
By gitfy:

This way of checking this._path(prefix + key) instanceof MixedSchema will always result in falsy result. The reason being this._path(prefix + key) doesn't return type. The "type" information is present in the this._path(prefix + key).options or in the schema.tree(path).type.

Even though this check fails, the Mixed types are not affect that much, except in situations like what i am using it for. In my app, i am trying to store the search filter criteria, so i defined a Mixed type property. Since the above check fails, it tries to evaluate the object path further down and if it happen to have a $gt or any of the $ operators of mongo, i get the exception " key $gt must not start with '$' ".