```python
state = request.args.get('state')
if state in ['all', 'not_null']:
    self.applied_filter_by.pop('state', None)
    if state == 'not_null':
        filter_args.append(~(self.model.state == OrderStates.created))
elif re.match("\D+(\d+)?.*", state):
    self.applied_filter_by['state'] = int(state)
```