catch nullpoint exception