improve tag object check