public boolean isValidCategory(@NotNull final PsiElement element, @NotNull String category) {
   final RegExpLanguageHost host = findRegExpHost(element);
   return host != null
       ? host.isValidCategory(category)
       : myDefaultProvider.isValidCategory(category);
 }