fix Java Null Pointer exception when diffing non-existent tree