Recurse down an attribute chain to the actual result data.

def _GetVal(self, obj, key):
    """Recurse down an attribute chain to the actual result data."""
    if "." in key:
      lhs, rhs = key.split(".", 1)
      obj2 = getattr(obj, lhs, None)
      if obj2 is None:
        return None
      return self._GetVal(obj2, rhs)
    else:
      return getattr(obj, key, None)