type check AST strings and identifiers

This is related to a21829180423 as well as #12609 and #12610.
diff --git a/Misc/NEWS b/Misc/NEWS
index c1162ed..b3ecefd 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
 Core and Builtins
 -----------------
 
+- Verify the types of AST strings and identifiers provided by the user before
+  compiling them.
+
 - Issue #12579: str.format_map() now raises a ValueError if used on a
   format string that contains positional fields. Initial patch by
   Julian Berman.