To begin with, Genesis 9 does not claim that there were no rainbows before the flood of Noah. It simply says that from the time of Noah onward, the rainbow will be a sign of God's promise.
However, it is certainly not impossible for there to have been no rainbows prior to the flood. The Bible states that prior to the creation of Man, the earth was watered by a fine mist that came up from it, and there was no rain yet. If the mist appeared only during dark hours, there would never be any opportunity for a rainbow.
Many Christians believe that this was the case until the time of the flood -- that there was no rain (and there were no rainclouds) over the entire earth at all until the flood.
However, as stated above, Genesis 9 does not make the claim that this is the case. It simply states that from the time of the flood onward, the rainbow would be a sign.
Someone may say, "what kind of a sign is that, if they were commonplace before hand? That doesn't sound like much of a sign!"
Be that as it may, the Bible has other examples of such things. Simply consider the scriptures below.
1 Samuel 14:8-10
Then Jonathan said, "Behold, we will cross over to the men and reveal ourselves to them. If they say to us, 'Wait until we come to you'; then we will stand in our place and not go up to them. But if they say, 'Come up to us,' then we will go up, for the LORD has given them into our hands; and this shall be the sign to us."
Had these men never before uttered the words "come up to us"?
2 Kings 19:29; Isaiah 37:30
Then this shall be the sign for you: you will eat this year what grows of itself, in the second year what springs from the same, and in the third year sow, reap, plant vineyards, and eat their fruit.
Had no one previously ever had enough to eat for two years from the produce of the land without having to labor over it?
"Instead of the thorn bush the cypress will come up, And instead of the nettle the myrtle will come up, And it will be a sign to the LORD, For an everlasting sign which will not be cut off."
Were there no cypresses before this time? Were there no myrtles before this time?
The sign of the rainbow in no way demands that rainbows did not exist prior to the flood. Nonetheless, there is likewise no reason to believe that they necessarily did exist prior to the flood either.