handle null type earlier