code: def coerceBigInt(x):
      
      # BigInt's are easy.
      if isinstance(x, BigInt):
          return x
  
      # Convert ints and longs using the constructor
      elif isinstance(x, (long, int)):
          return BigInt(x)
  
      else:
          return None
docs: Retrieves a BigInt from @x or returns None if @x is not a type that can be
      converted.