Let to_name/1 also accepts lists as input.