When testing and validating inputs we don't know what we're going to get. Using a definitive approach right out of the gate may not be the way to go. What if we assume the user is entering correct input, to the best of their knowledge. Then it is up to us to coerce that input into the data type we wish to continue with. This means assume the input looks like what we're after.
Given this premise, can you take another look at your code and refine it?
Can we rule out that it is a list? How about a dictionary? How about a function? Once we rule out those objects we're down to primitives, Boolean, Number, or String.
One thing we know for sure, a lot can be eliminated with,
isnan(). Then we're down to separating float from integer. Once we know we have a number, an integer is not very far away.