private static void assertValid(@Nullable PyType result, @NotNull PyTypedElement element) {
    if (result != null) {
      result.assertValid(element.toString());
    }
  }
private static void assertValid(@Nullable PyType result, @NotNull PyTypedElement element)