** Added null-check into bot.njs emit method