title: TypeError: Cannot read property 'push' of null when inserting first value
body: <p>So I have been trying to wrap my head around this for hours now and can't seem to figure it out, i've tried the different solutions that people have discussed here in Stackoverflow such as checking if there is an array and if not make one and what not, but I still get the error.
  TypeError: Cannot read property 'push' of null</p>
  
  <p><strong>NOTICE!</strong>
  This only happens when inputting the <strong>FIRST</strong> value into the object and after that it works fine.</p>
  
  <p><strong>Here is the global variable</strong></p>
  
  <pre><code>$scope.globalTitleArray = $scope.globalTitleArray || [];
  </code></pre>
  
  <p><strong>Here is my controller</strong></p>
  
  <pre><code>$scope.addDefaultTitle = function () {
      if ($scope.assignment.title === ""){
              $flashMessage.error('Du måste fylla i titelfältet innan du lägger till en default title.')
      }else{
      if ($scope.assignment.innerCategory === null) {
          $flashMessage.error('För att lägga till en default title måste du först spara en inner category, samt när du skriver in din önskade default title ska area ej finnas med.', 'Error');
      }
         categoryService.addDefaultTitle($scope.assignment.innerCategory.id, $scope.assignment.title).then(function () {
              $flashMessage.success('The Default Title has been added.', 'Saved');
  
              var areaName = $scope.postalCodeName ? $scope.postalCodeName : $scope.assignment.subArea.short_name;
              return $scope.assignment.title = $scope.assignment.title + ', ' + areaName;
          });
          $scope.globalTitleArray.push($scope.assignment.title);
      }
  };
  </code></pre>