fix mongoengine and peewee exceptions when filtering for noninteger values