Added handling of null values in variable bindings

with tests
Improved batch tests