You can READ the state of a pin anytime. Even if it is configured as an output.