attr: change validity check for attribute names to use positive logic