How should I write:
if @parent.child.grand_child.attribute.present? do_something
without cumbersome nil checkings to avoid exception:
You could use Object#andand.
With it your code would look like this:
if @parent.andand.child.andand.grandchild.andand.attribute