In the root you will need to use the &&(not defined?) operator , but it can be very verbose, very fast.
So instead:
(@object && @object.something && @object.something.with_something &&
@object.something.with_something.value)
You can do this when ActiveSupport is present:
@object.try(:something).try(:with_something).try(:value)
:
Ick::Maybe.belongs_to YourClass
maybe(@object) { |obj| obj.something.with_something.value }