If contains command not working for the formmenu

I don't know why the if command is only working for the electromagnetic waves selection for the typesimprove formmenu, but it is not working for the other selections. What am I doing wrong? I have if commands set up this exact way for other parts of the same snippet that is working, but this section is not. What is wrong with the mechanical waves, longitudinal waves, and transverse wave selections that are not allowing the If contains command to not work?

Snippet code:

:seedling: Time to grow your understanding of: {formmenu: name=typesimprove; ; electromagnetic waves; mechanical waves; longitudinal waves; transverse waves; electromagnetic spectrum; multiple=yes; formatter=items -> join(items, "BLAZE_AND")}

:rocket: Opportunities for Growth
Every gap we identify is just a roadmap for what to master next. I encourage you to review : {if: contains({=typesimprove}, "mechanical waves")}
Mechanical waves require a medium to travel through. {endif}{if: contains({=typesimprove}, "electromagnetic waves")}
Electromagnetic waves can travel through a vacuum. {endif} {if: contains({=typesimprove}, " longitudinal waves")}
Longitudinal waves have particles that move in the same direction as the wave. {endif}{if: contains({=typesimprove}, " transverse waves")}
Transverse waves have particles that move at right angles to the direction of the wave. {endif}

Would this work for you:

Time to grow your understanding of:{note} {formmenu: electromagnetic waves; mechanical waves; longitudinal waves; transverse waves; electromagnetic spectrum; name=typesimprove; multiple=yes} {endnote}
{=join(typesimprove, "BLAZE_AND")}

**Opportunities for Growth**
Every gap we identify is just a roadmap for what to master next. I encourage you to review :
{if: contains(typesimprove,"electromagnetic waves")}
Electromagnetic waves can travel through a vacuum. {endif}
{if: contains(typesimprove,"mechanical waves")}
Mechanical waves require a medium to travel through. {endif}
{if: contains(typesimprove,"longitudinal waves")}
Longitudinal waves have particles that move in the same direction as the wave. {endif}
{if: contains(typesimprove,"transverse waves")}
Transverse waves have particles that move at right angles to the direction of the wave. {endif}
{if: contains(typesimprove,"electromagnetic spectrum")}
When the menu selection is "electromagnetic spectrum", this will show.{endif}

That worked! Thank you!