Fixed list type checks in to_obj() and to_dict() of ProcessTreeNode