[NUI] add null type checking after as operation.