Bug 866826 - Add missing IdToTypeId check, r=dvander.