if obj is nothing then
 obj.close
end if