Ensure families is not nullptr before using it

When there's no benchmarks, families becomes nullptr. So before touching
it, we need to ensure families is not nullptr.

NOTE:
I've read contributing guidelines and signed CLA.