Better error message for invalid tag object