[python] Checking whether a variable is an integer or not