Fix crash if invalid row given. Fixes #113.

Return null instead of crashing if row is invalid.