Implement a function that validates the state of a game board, such as checking for a winner in a grid.
Implement check_winner(board), where board is a non-empty square list of lists containing only "X", "O", or ".". Return "X" or "O" if that symbol fills an entire row, column, or main diagonal. Return None if neither symbol has a winning line.
The board contains at most one winning symbol.
def check_winner(board):