Implement logic for tag getter and setter