add nullReference check
Merge pull request #630 from olga-jane/sidorov_ComponentNotExist#618

add nullReference check (Exception appears if typed component does not exist)