add tests for nil and str