You will need to check that the value is set, i would try something like this, I leave the original object as is then pass the object through a switch node, checking that the property key of payload exists.
[{"id":"7cb49ed1.f23d58","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"($random()*1 )> 0.2 ?\t{\"adcval1\":1,\"UV_Sensor\":2.2,\"ESP_5Volt\":3} :\t{\"adcval1\":1,\"ESP_5Volt\":3}","payloadType":"jsonata","x":270,"y":840,"wires":[["91d4624e.05c058","353dd9db.a0d64e"]]},{"id":"91d4624e.05c058","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":780,"wires":[]},{"id":"353dd9db.a0d64e","type":"switch","z":"bf9e1e33.030598","name":"","property":"payload","propertyType":"msg","rules":[{"t":"hask","v":"UV_Sensor","vt":"str"},{"t":"hask","v":"ESP_5Volt","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":840,"wires":[["394a1d81.04daca"],["8e911d52.4f08e8"]]},{"id":"394a1d81.04daca","type":"function","z":"bf9e1e33.030598","name":"","func":"msg.payload.UV_Sensor *= 2;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":820,"wires":[["cf18ded0.86cc18","91d4624e.05c058"]]},{"id":"8e911d52.4f08e8","type":"ui_gauge","z":"bf9e1e33.030598","name":"","group":"8b5cde76.edd58","order":2,"width":0,"height":0,"gtype":"gage","title":"esp","label":"units","format":"{{msg.payload.ESP_5Volt | number }}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":750,"y":840,"wires":[]},{"id":"cf18ded0.86cc18","type":"ui_gauge","z":"bf9e1e33.030598","name":"","group":"8b5cde76.edd58","order":2,"width":0,"height":0,"gtype":"gage","title":"uv","label":"units","format":"{{msg.payload.UV_Sensor | number }}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":750,"y":800,"wires":[]},{"id":"8b5cde76.edd58","type":"ui_group","name":"default","tab":"8f03e639.85956","order":1,"disp":false,"width":"12","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","order":2,"disabled":false,"hidden":false}]
The inject produces an object that randomly is missing the sensor key.
[edit] added correct function.