boolean (@Nullable Project project) { ThreadingAssertions.assertEventDispatchThread(); if (ourModalEntities.isEmpty()) return false; if (project == null) return true; List<Dialog> modalEntitiesForProject = projectToModalEntities.get(project); return modalEntitiesForProject == null || modalEntitiesForProject.isEmpty(); }