escape value before storing