Prevent POSKeyError to create a state object.