docs: def _raise_on_bad_jar_filename(jar_filename):
          """Ensure that jar_filename is a valid path to a jar file."""
          if jar_filename is None:
              return
  
          if not isinstance(jar_filename, string_type):
              raise TypeError("jar_filename is not a string: %r" % jar_filename)
  
          if not os.path.exists(jar_filename):
              raise ValueError("jar_filename does not exist: %r" % jar_filename)