Another check for invalid row parameter.

Don't crash if invalid row is given. Not tested properly, but looks trivial.