Transform that Family Instance Geometry

Oh, if I had a nickel for every time I forgot (and later remembered) that geometry of family instances needs to be transformed like this…

Transform transform = null;
if (elem is FamilyInstance)
    FamilyInstance fi = elem as FamilyInstance;
    transform = fi.GetTransform();
PlanarFace pf = elem.GetGeometryObjectFromReference(r) as PlanarFace;
if (pf == null)
XYZ norm = pf.FaceNormal;
if (transform != null)
    norm = transform.OfVector(norm);