Detect effect's state on state object, instead of on type