handle empty cells gracefully