Handle nil in :pretty_value before escaping