x: List[int] If I have code like above, which is declaring an object x with List with an explicit type int using Python's typing library (using Python 3.7). Is there a way that I can find out that this object x is an integer type? Not just a list type. I know if I do type(x) it'll give <class 'list'>, but doesn't say it's an integer type list. I also tried type(x[0]) and it gave <class 'NoneType'>, which makes sense that it's an empty list. I can't initialize the first element with integer type value (i.e. x: List[int] = [0]) or something as it is assigning an arbitrary value to the list, which may cause an issue if we do not handle (override to the proper value) it properly and it's risky (for me at least). Continue reading...