Checks if number is a prime number.