code: def _is_path(s):
      
      if isinstance(s, string_types):
          try:
              return op.exists(s)
          except (OSError, ValueError):
              return False
      else:
          return False
docs: Return whether an object is a path.