Keep attr's type except for type and buffer_type