add a check to be sure that the value exists when trying to format the value for display