code: def _input_optional(inp):
          
          if 'default' in inp.keys():
              return True
  
          typ = inp.get('type')
          if isinstance(typ, six.string_types):
              return typ.endswith('?')
          elif isinstance(typ, dict):
              # TODO: handle case where iput type is dict
              return False
          elif isinstance(typ, list):
              # The cwltool validation expands optional arguments to
              # [u'null', <type>]
              return bool(u'null' in typ)
          else:
              raise ValueError('Invalid input "{}"'.format(inp.get['id']))
docs: Returns True if a step input parameter is optional.
  
          Args:
              inp (dict): a dictionary representation of an input.
  
          Raises:
              ValueError: The inp provided is not valid.