I am trying to see how to improve following code....need to somehow not use the flag and still return null in case not dirty. function MyObject doSomething(someOject) { boolean isDirty = false; MyObject myobject = new MyObject(); if (someOject.getProperty() != null) { isDirty = true m...