Avoid errors on malformed `transition` values

Return the original value if there is an invalid `transition` value.
Previously it resulted in an Error.