Fix for cgi.FieldStorage not indexable under certain circumstances

I found an issue when hitting an app with this middleware installed via the Requests library - a FieldStorage object is not created successfully under certain circumstances, so a contains check causes an exception.  Simply checking the object before the contains check fixes the issue.