Evaluation of metal nitrides as the negative electrode in sodium-ion batteries and as a protective coating in lithium metal batteries