Change deprecated .className to .type

Redo pull #3697