Check for null before formatting (refs #331)