check n.Value() before doing anything

should fix #139