test: use gc() to try to clear objects when testing for leaks
test: output error message if there is one
test: add test for params with null