Allow setting app- and local-state to nil