title: Method for calculating the final score of fields with type of None
body: <p>Help me please figure out how to correctly check the value of the fields and draw up a total score of goals. The problem is that the final estimate is calculated by the <code>pre_save</code> method. And model has first half time of match, second half time of match and shootout score. User can just update the first halftime score and save that model in this case <code>pre_save</code> will take this value, add it to total score and ignore second halftime and shootout. But after second halftime of match, User have to update the score of second halftime and then <code>pre_save</code> method will calculate this two values (first and second) and ignore shootout and so one. I hope you will understand what I will achieve. Here is my model:</p>
  
  <pre><code>class GroupstageTournamentModel(ClusterableModel):
      #Score of TEAM 1
      team_1_first_halftime_score = models.PositiveSmallIntegerField(blank=True, default=None, verbose_name='Resultat 1. HZ')
      team_1_first_halftime_point = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Punkte 1. HZ')
      team_1_second_halftime_score = models.PositiveSmallIntegerField(blank=True, default=None, verbose_name='Resultat 2. HZ')
      team_1_second_halftime_point = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Punkte 2. HZ')
      team_1_shootout_score = models.PositiveSmallIntegerField(blank=True, default=None, verbose_name='Resultat Shootout')
      team_1_shootout_point = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Schootout Punkte')
      team_1_total_score = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Resultat Total')
      team_1_total_points = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Punkte Total')
  
      #Score of TEAM 2
      team_2_first_halftime_score = models.PositiveSmallIntegerField(blank=True, default=None, verbose_name='Resultat 1. HZ')
      team_2_first_halftime_point = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Punkte 1. HZ')
      team_2_second_halftime_score = models.PositiveSmallIntegerField(blank=True, default=None, verbose_name='Resultat 2. HZ')
      team_2_second_halftime_point = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Punkte 2. HZ')
      team_2_shootout_score = models.PositiveSmallIntegerField(blank=True, default=None, verbose_name='Resultat Shootout')
      team_2_shootout_point = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Schootout Punkte')
      team_2_total_score = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Resultat Total')
      team_2_total_points = models.PositiveSmallIntegerField(blank=True, default=0, verbose_name='Punkte Total')
  
      @receiver(pre_save, sender='tournament.GroupstageTournamentModel')
      def my_callback(sender, instance, *args, **kwargs):
          # Point for first half time
          if not (instance.team_1_first_halftime_score is None and instance.team_2_first_halftime_score is None):
              if instance.team_1_first_halftime_score &gt; instance.team_2_first_halftime_score:
                  instance.team_1_first_halftime_point += 2
          elif not (instance.team_1_first_halftime_score is None and instance.team_2_first_halftime_score is None):
              if instance.team_2_first_halftime_score &gt; instance.team_1_first_halftime_score:
                  instance.team_2_first_halftime_point += 2
          elif not (instance.team_1_first_halftime_score is None and instance.team_2_first_halftime_score is None):
              if instance.team_1_first_halftime_score == instance.team_2_first_halftime_score:
                  instance.team_2_first_halftime_point += 1
                  instance.team_1_first_halftime_point += 1
          # Point for second half time
          if not (instance.team_1_second_halftime_score is None and instance.team_2_second_halftime_score is None):
              if instance.team_1_second_halftime_score &gt; instance.team_2_second_halftime_score:
                  instance.team_1_second_halftime_point += 2
          elif not (instance.team_1_second_halftime_score is None and instance.team_2_second_halftime_score is None):
              if instance.team_2_second_halftime_score &gt; instance.team_1_second_halftime_score:
                  instance.team_2_second_halftime_point += 2
          elif not (instance.team_1_second_halftime_score is None and instance.team_2_second_halftime_score is None):
              if instance.team_1_second_halftime_score == instance.team_2_second_halftime_score:
                  instance.team_2_second_halftime_point += 1
                  instance.team_1_second_halftime_point += 1
          # Point for Shootout
          if not (instance.team_1_shootout_score is None and instance.team_2_shootout_score is None):
              if instance.team_1_shootout_score &gt; instance.team_2_shootout_score:
                  instance.team_1_shootout_point += 1
          elif not (instance.team_1_shootout_score is None and instance.team_2_shootout_score is None):
              if instance.team_2_shootout_score &gt; instance.team_1_shootout_score:
                  instance.team_2_shootout_point += 1
          elif not (instance.team_1_shootout_score is None and instance.team_2_shootout_score is None):
              if instance.team_1_shootout_score == instance.team_2_shootout_score:
                  instance.team_1_shootout_point += 0
                  instance.team_2_shootout_point += 0
          instance.team_1_total_score = instance.team_1_first_halftime_score + instance.team_1_second_halftime_score + instance.team_1_shootout_score
          instance.team_2_total_score = instance.team_2_first_halftime_score + instance.team_2_second_halftime_score + instance.team_2_shootout_score
          instance.team_1_total_points = instance.team_1_first_halftime_point + instance.team_1_second_halftime_point + instance.team_1_shootout_point
          instance.team_2_total_points = instance.team_2_first_halftime_point + instance.team_2_second_halftime_point + instance.team_2_shootout_point
  </code></pre>
  
  <p>I have created some calculation of first, second and shootout scores. I initially wanted to cut this part of the code, but maybe this will make even clearer what I'm going to do.</p>
  
  <p>NOTE. Its easy to do if I define default values as 0, but in this case my <code>pre_save</code> method will add automatically 1 point to both teams because the match ended with a score of 0 0.</p>
  
  <p>Current code returns <code>TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'</code>
  And I started to fix it but im not sure how to solve this problem.</p>