Path getValidNodePath(Object path, [ String basePath ])

Source

static Path getValidNodePath(Object path, [String basePath]) {
  if (path is String) {
    Path p = new Path(path);
    if (p.valid && p.isNode) {
      return p..mergeBasePath(basePath);
    }
  }
  return null;
}