Check 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.