Changed integer-check function