+1. You can do body.get('consumer_criteria', None) or  body.get('consumer_criteria', {}) depending on whether you want to raise an error or consider all consumers if criteria is not specified.