code: def check_block(block_id):
      
      if type(block_id) not in [int, long]:
          return False
  
      if BLOCKSTACK_TEST:
          if block_id <= 0:
              return False
  
      else:
          if block_id < FIRST_BLOCK_MAINNET:
              return False
  
      if block_id > 1e7:
          # 1 million blocks? not in my lifetime
          return False
  
      return True
docs: Verify that a block ID is valid
  
      >>> check_block(FIRST_BLOCK_MAINNET)
      True
      >>> check_block(FIRST_BLOCK_MAINNET-1)
      False
      >>> check_block(-1)
      False
      >>> check_block("abc")
      False
      >>> check_block(int(1e7) + 1)
      False
      >>> check_block(int(1e7) - 1)
      True