Fills in an empty sudoku board and checks the validity of the input