title: invalid operands to binary expression ('RGBTRIPLE' and 'int')
body: <p>I got this error when I tried to look particular value exist or not. I used a custom data type called <code>RGBTRIPLE</code> that cs50 provides me. If the value is not exist in the memory I will get 'segmentation fault' because I need to find out top left, top middle, top right, value that I have its previous value and next value, bottom left, bottom middle, bottom right value. So for that I used a function called <code>isNull</code>. It will check whether the value exists in the memory or not. If it is not null It will return 1, otherwise 0.</p>
  <blockquote>
  <p>Here is my code</p>
  </blockquote>
  <pre><code>// Blur image
  void blur(int height, int width, RGBTRIPLE image[height][width])
  {
      // entering the array of the image
      for (int i = 0; i &lt; height; i++)
      {
          // entering the array of the row
          for (int j = 0; j &lt; width; j++)
          {
              /* blur: the element we select we need to get the value
                 of its neighbour value and adding this all including it
                 then get the avg value of pixel that need to set
               */
  
              int element = 0;
              int blueSum = 0;
              int greenSum = 0;
              int redSum = 0;
  
              RGBTRIPLE pixels[] = {
                  image[i][j], image[i][j - 1], image[i][j + 1],
                  image[i - 1][j - 1], image[i - 1][j], image[i - 1][i + 1],
                  image[i + 1][j - 1], image[i + 1][j], image[i + 1][j + 1]
              };
  
              for (int k = 0; k &lt; 9; k++)
              {
                  if (isNull(pixels[k]) == 1)
                  {
                      element++;
                      blueSum += pixels[k].rgbtBlue;
                      greenSum += pixels[k].rgbtGreen;
                      redSum += pixels[k].rgbtRed;
                  }
              }
  
              image[i][j].rgbtBlue = round(blueSum / element);
              image[i][j].rgbtGreen = round(greenSum / element);
              image[i][j].rgbtRed = round(redSum / element);
          }
      }
      return;
  }
  
  // check whether it is null or not
  int isNull(RGBTRIPLE pixel)
  {
      if (pixel != 0)
      {
          return 1;
      }
  
      return 0;
  }
  </code></pre>
  <blockquote>
  <p>Error I got:</p>
  </blockquote>
  <pre><code>$ make filter
  helpers.c:142:15: error: invalid operands to binary expression ('RGBTRIPLE' and 'int')
      if (pixel != 0)
          ~~~~~ ^  ~
  1 error generated.
  make: *** [Makefile:2: filter] Error 1
  </code></pre>