Python Check If Type Is Integer Function