It works. I thought digitalRead was for pinMode(..., INPUT) only...
Yes it works. Also one can perform a digitalWrite(pin#, HIGH) to a digital pin that is in the INPUT mode, that will turn on the internal pull-up resistor for that pin. A digitalWrite(pin#, LOW) to a input pin will turn off it's internal pull-up. This is useful when reading simple button switches as it saves needing to use an external pull-up resistor for each switch input you use in a project.
The point paulS was making is that there should never be a need to read a digital output to determine it's state as it only gets turned on or off by statements in your sketch code and therefore it's last changed state value is something your program can save in a variable that you can use to determine it's present state using simple if statements.