[Python-checkins] GH-130415: Use boolean guards to narrow types to values in the JIT (GH-130659)