Using 'not' or '!' criteria causes MongoError

I'm getting the following error when trying to use the 'not' or '!' criteria: 

[MongoError: invalid regular expression operator] name: 'MongoError'

This simple fix worked for me:
Add missing return statement to the if block that adds 'not' criteria.