Add prime number check function.