Handle undef in codegen