if instance is nil, instance.state is also nil