setnl function

Setter function to set a variable of a nl object