fix(typeSearch/compareMode): Fix NPE

- fix NPE when open a class about type search
- fix NPE in compare mode

related to #CAM-1872, #CAM-1863