catch NULL pointer