Safer handling of attributes