String comparasion is poor performance even though one use std::strcmp because it tries to find the first ocurrence of '\0' character in string.
Unless you use string hash, but is not the case.
So... I uploaded a blueprint example. I try to "idle" the character if there is not any animation.
I do not know if there is a better way, like a state machine.
In the picture, if the animation name is "idle", it adds a new "idle" animation.
If the animation name is "run", I remove "running" from character state and add animation "idle"... and so on