Add Chain.def method

Allows the value to be replaced with a default value if the value
is undefined