Gets the state stored under key.
the value containing the stored state deserialized, or null if not set.
the name of the state key.