input: Write a function to modify the given Python code so that it raises a `TypeError` if the input value is not an integer. The function should take an input `x`, check if `x` is an integer, and if not, raise a `TypeError` with the message 'Input must be an integer'. If `x` is an integer, it should return the square root of `x`.
  
  
  def square_root(x):
      if not isinstance(x, int):
          raise TypeError('Input must be an integer')
      return x**0.5
  
  assert square_root(4) == 2.0
  assert square_root(9) == 3.0
  try:
      square_root('4')
  except TypeError as e:
      assert str(e) == 'Input must be an integer'
  try:
      square_root(4.5)
  except TypeError as e:
      assert str(e) == 'Input must be an integer'
output: def square_root(x):
      if not isinstance(x, int):
          raise TypeError('Input must be an integer')
      return x**0.5