Made setType case insensitive