handle case when tags is None