The reaction should be conducted in an oxygen-free, pure nitrogen atmosphere where those compounds should be safe to handle.
It’s a not-uncommon mistake to make in a synthetic lab.
[0] example: https://blogs.sciencemag.org/pipeline/archives/2010/02/23/th...