Hi Baqir,
On you incident entity you can set another boolean variable (showCheckBox)
When adding or removing a categegory, you can check if the incident is still associated with a category that requires showing the checkbox. If so, set it to true else set it to false. Now refresh you incident and you should only see the checkbox when necessary.
Hope this helps!