Is there a cleaner way to update the blend weight variable?

Context: i have two statemachines, lowerbodysm which computes the idle and cycle animations. and upperbodysm which computes the aiming and blocking animations, more will states will be added in the future. The StateMachine poses are then blended using the “layered blend bone”, where the blend weight is set dynamically, this is done because I want to exclusively use the lowerbodysm pose when the character is not aiming nor blocking, and to blend both poses otherwise.

The logic I am using to update the lowerUpperBodyBlendWeight (LUBBW for short) is present in the following photos. This solution works as intended; however it feels very janky to me, and I am wandering if there is a better way to handle the update.