fix check for empty cells in rst template

used isspace before, which is wrong from empty strings

simpler alternative to #5427

just writing a test now