title: How to ensure that user can input any datatype (str, float, int, boolean...)?
body: <p>So this is my first question on the forum and I hope I am doing it correct.
  <strong>General question:</strong> How can I ensure that python does not return any errors when writing a script that allows the user to input values of different datatypes depending on the context or parameter they want to change?
  <strong>More specific:</strong> I am new to python and want to write a script that allows users of The Foundry's Nuke to change values on multiple nodes of the same class at once. Depending on whether the desired parameter to change is a checkbox('bool'), and RGBA input ('4 floats')... the input has to be of a different type. Searching the forum I found that the type can be checked by <em>type()</em> function and compared in an if statement with the <em>isinstance()</em> function. I guess I could work with that, but the type of e.g. a Gradenode's multiply knob returns type 'AColor_Knob'. I expected something like float. And comparing it in an isinstance() does not give me a match regardless of the datatype I am comparing to.</p>
  
  <p><strong>Mainscript so far:</strong>  </p>
  
  <pre><code>nukescripts.clear_selection_recursive()
  
  userInput = nuke.getInput('Which type of nodes would you like to select? (!!!first char has to be capitalized!!!)',
                            'Shuffle')
  
  matchingNodes = []
  
  for each in nuke.allNodes():
      if each.Class() == userInput:
          matchingNodes.append(each)
      else:
          pass
  
  for i in matchingNodes:
      i.setSelected(True)
  
  nuke.message(str(len(
      matchingNodes)) + ' matching Nodes have been found and are now selected! (if 0 there either is no node of this type or misspelling caused an error!)')
  
  userInput_2 = nuke.getInput('Which parameter of these nodes would you like to change? \n' +
                              '(!!!correct spelling can be found out by hovering over parameter in Properties Pane!!!)',
                              'postage_stamp')
  userInput_3 = nuke.getInput('To what do you want to change the specified parameter? \n' +
                              '(allowed input depends on parameter type (e.g. string, int, boolean(True/False)))', 'True')
  
  for item in matchingNodes:
      item.knob(userInput_2).setValue(userInput_3)
  </code></pre>
  
  <p><strong>How I checked the datatypes so far:</strong></p>
  
  <pre><code>selected = nuke.selectedNode()
  knobsel = selected.knob('multiply')
  print(type(knobsel))
  #if type(knobsel) == bool:
  if isinstance(knobsel, (str,bool,int,float,list)):
      print('match')
  else:
      print('no match')
  </code></pre>