code: protected function generateContentTypeFilter($contentType)
      {
          $filter = null;
  
          if (!is_null($contentType) && '' != $contentType) {
              $filter = array('contentType' => $contentType);
          }
  
          return $filter;
      }
docs: Generate Content Type filter
  
  @param string|null $contentType
  
  @return array|null