avoid undefined method `foo' for nil:NilClass when state is nil

Sometimes node state can be nil.  We should consistently return a String
("unknown") even in these cases, to ensure that code like

  node.state.titlecase

doesn't barf.