protected static @Nullable VirtualFile findDir(@Nullable String baseDir) {
    if (StringUtil.isEmpty(baseDir)) {
      return null;
    }
    VirtualFile dir = LocalFileSystem.getInstance().findFileByPath(baseDir);
    return dir != null && dir.isValid() && dir.isDirectory() ? dir : null;
  }
protected static @Nullable VirtualFile findDir(@Nullable String baseDir)