As I have said, it is difficult to second guess, the heater should not come on if there isn't enough water in it, but there is very little water in these machines anyway so if the circulation pump is faulty then you will get a humming noise and the heater glowing because no water is being splashed over the element.
If the valve is faulty then it should give an error message of a fill time out and the heater should not come on, unless of course the pressure switch has stuck closed.
TBH I have very rarely changed valves or pressure switches, plenty of main circulation pumps, heaters and PCB's though.
Again this is all pure speculation without knowing exactly what model you have.
That which can be asserted without evidence, can be dismissed without evidence.