Support untyped state machine to simplify state machine usage but also consider the type safety