Fix NPEs when project contains no external dialects.