GH-130415: Narrow str to "" based on boolean tests
#130476
Merged
str to "" based on boolean tests
#130476