input: Write a function to multiply two matrices and return the resulting matrix. The function should check if the multiplication is possible based on the dimensions of the input matrices. If the number of columns in the first matrix does not match the number of rows in the second matrix, the function should return None.
  
  def matrix_multiplication(A, B):
      if len(A[0]) != len(B):
          return None
      rows_A = len(A)
      cols_B = len(B[0])
      result = [[0 for i in range(cols_B)] for j in range(rows_A)]
      for i in range(rows_A):
          for j in range(cols_B):
              for k in range(len(A[0])):
                  result[i][j] += A[i][k] * B[k][j]
      return result
  
  assert matrix_multiplication([[1, 2], [3, 4]], [[5, 6], [7, 8]]) == [[19, 22], [43, 50]]
  assert matrix_multiplication([[1, 2, 3], [4, 5, 6]], [[7, 8], [9, 10], [11, 12]]) == [[58, 64], [139, 154]]
  assert matrix_multiplication([[1, 2]], [[3], [4]]) == [[11]]
  assert matrix_multiplication([[1, 2]], [[3, 4], [5, 6]]) == None
  assert matrix_multiplication([], []) == []
output: 
  def matrix_multiplication(A, B):
      if len(A[0]) != len(B):
          return None
      rows_A = len(A)
      cols_B = len(B[0])
      result = [[0 for i in range(cols_B)] for j in range(rows_A)]
      for i in range(rows_A):
          for j in range(cols_B):
              for k in range(len(A[0])):
                  result[i][j] += A[i][k] * B[k][j]
      return result
  