fixed a check against a non-null but empty list of tags