Check if integer is prime