Fix no method chomp on NilClass attribute errors

The hostname/myhost/mydomain attributes try to chomp on a nil value,
mainly the node["domain"] attribute. Additionally, || is used after a
chomp, so empty string values will probably never hit the second half of
the statement.

Code like this makes me with we had active_support/blank in core Ruby.

Fixes https://tickets.opscode.com/browse/COOK-3617