code: def digit(nstr, schema):
      
      if isinstance(nstr, int):
          nstr = str(nstr)
      elif not isinstance(nstr, basestring):
          return False
  
      return nstr.isdigit()
docs: !~~digit
          '0123456789'.isdigit() or 123456789