Can a Ranger bond with a beast that’s secretly an Angel in disguise?

In my game there’s a Ranger who is a demigod and doesn’t know it (my homebrew, but shouldn’t affect the question I have). He has a pet “lizard” who is actually a polymorphed Deva in disguise that his father sent to keep tabs on him. The Deva is using his innate polymorphing ability.

The player is planning on taking the Beast Master Archetype and wants to choose his pet “Gecky” the “lizard” as his ranger companion. Would “Gecky” count as a Beast for the purpose of bonding if he’s already spent years in polymorphed form watching over him, or would bonding fail due to his being of the Celestial type?