handle script/command that return undefined differently