function emitErrorAndCloseNT(self, err) {
  emitErrorNT(self, err);
  emitCloseNT(self);
}
Check if the command has the flag

Some of possible flags: readonly, noscript, loading
@param {string} commandName - the command name
@param {string} flag - the flag to check
@return {boolean} result
@public