diff --git a/gooey/python_bindings/argparse_to_json.py b/gooey/python_bindings/argparse_to_json.py
index ce11fa6..0dee008 100644
--- a/gooey/python_bindings/argparse_to_json.py
+++ b/gooey/python_bindings/argparse_to_json.py
@@ -68,7 +68,7 @@ def convert(parser):
 
 def get_widget(action, widgets):
   supplied_widget = widgets.get(action.dest, None)
-  type_arg_widget = 'FileChooser' if type(action.type) == type(argparse.FileType) else None
+  type_arg_widget = 'FileChooser' if action.type == argparse.FileType else None
   return supplied_widget or type_arg_widget or None