while removing tags also check for empty value