IDEAPLUGIN-10 added check to see if type is still valid