A promise or agreement does not have to be codified to have value, especially not when considering the context: Russia was making a large concession, and an assurance that NATO would not encircle them would have been essential.
See 2 minutes of this argument presented by Noam Chomsky: https://youtu.be/Iq5IlDB-Ago?t=187
Regarding NATO being a threat to Russia, this is more complex than simply whether NATO would directly attack.
Firstly, NATO can and has placed weaponry that could quickly hit essential Russian targets on bordering countries. Recall the Cuban missile crisis and how that almost started a war.
Furthermore, NATO has been a driving force of regime change and invasion since the fall of the Soviet Union, especially in Serbia, Iraq, Afghanistan, Libya, Syria.
If Russia was expanding military alliances and placing weapons along the border of the US, the reaction would likely have been even more intense than what we have seen from Russia.
Does this excuse all parts of Russia's intervention? I would say no, because I think they could have relied on less violent solutions, such as withholding supply of energy, etc., but I am not on the inside of the conflict to a degree where my opinion has much value.