Add a condition for the blockCount parameter of the rpc feeHistory to make it more robust.
blockCount