I did it by Air without a valid Visa. It does not matter.
BUT, you absolutely cannot go to another country from the US (this is a big GOTCHA!!). If you go to for example Mexico when you visit the US, then you will need a valid Canadian Visa to come back to Canada. YOU CAN ONLY GO TO THE US AND...