primality: Coalesce some ifs.