public static @Nullable Object getLastUserObject(@Nullable TreePath path) {
    return path == null ? null : getUserObject(path.getLastPathComponent());
  }
public static @Nullable Object getLastUserObject(@Nullable TreePath path)