def is_prime(n):
    """
    Check whether a number is prime.
    Returns True if prime, False otherwise.
    """

    if not isinstance(n, int):
        return False

    if n <= 1:
        return "not prime"

    if n <= 3:
        return "Prime"

    if n % 2 == 0 or n % 3 == 0:
        return "not prime"

    i = 5
    while i * i <= n:
        if n % i == 0 or n % (i + 2) == 0:
            return "Not prime"
        i += 6

    return "Prime"
