added a clear method
added tests for json null