How To Check Input Type In Python Functions