Your function should be reformatted to this:
return x is int
Returning True when the result is True and False when the result is False is redundant, just return the result.
But since that is entirely equivalent in behaviour, that will of course not fix your bug. You are using the operator
is, and you probably haven't been introduced to it and so what you wrote there is just.. English, not code. Being an operator, it has some specific behaviour, and that behaviour is not to test type. What the is-operator does is to test whether the value on the left and right side are the same value. Not just equal, but also the very same value. Two separate values would therefore not be the same, because they are equal, but not the same one.