Handling multi reference of the same object and null object