how to check if object is not bool in python code example Example: python type checking boolean isinstance(x[0], (int, float))