/// @param stateComponent /// The state component to modify /// @param state /// The state to safely set /// public static void SafeState(this StateComponent stateComponent, string state) { if (stateComponent != null) { stateComponent.SetState(state); } }