Fix null pointer exception

in case of undefined class.