Check for null pointers when printing.

Don't crash when given an fi_info with null pointers in struct fields (like one allocated on the stack).

Signed-off-by: pmmccorm <patrick.m.mccormick@intel.com>
I think these changes would be better structured as:

if (!attr) {
   strcatf(...)
   return;
}

Rather than having the if statement handle only a single line of what should be done if we do have attr.