Literally speaking, it doesn’t matter that he was armed. What matters is what he was doing with the gun just before he was shot.
It matters if he didn’t put it down when the Police told him to.