make sure attr is string when calling indexOf, test list removeAttr