Only include hardware info for machines that can be found

Minor tweak to avoid tracebacks when m is None.