Adds two guard clauses for events in mutators and flyouts

  - When a block in a mutator window is deselected, it triggers a workspace
    changed event that will run after the workspace has been disposed of. These
    two guard clauses are early returns if the target workspace is null.


We don't really use filterForCapacity_ so we could modify the signature of the init function in flyuot.js to inject a boolean that will control if the function is registered or not. But that would deviate us (more) from Blockly core.
In any case, that would only fix one of the TypeErrors.