There is a few issues here:

- the name of the variable is missibleading as you don't store the initial dispatcher in it but a boolean
- the comparison should be strict (the coding standard is that we always use strict comparison unless we really need to avoid it)
- the braces around the condition are useless
- there is no need to use a variable. You can put the condition directly in the if