Bug 932530 - Check return of getType in more places; r=djvj

--HG--
extra : rebase_source : 58f83c065dd227ba14243891da6b12a6d610765c