handle error when null type