Check if obj is null in getDObject, Fix #54