title: NoSuchMethodError: The method 'map' was called on null
body: <p>[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The method 'map' was called on null.
  E/flutter (19718): Receiver: null
  E/flutter (19718): Tried calling: map(Closure: (dynamic) => SeriesNo)</p>
  
  <p>I tried json_annotation and json Serieizable but don't work.According my model one.json is ok.but two.json is reques error happen as title.How to solve.I known series no is error but i have no idea how to solve.</p>
  
  <p>This is one.json</p>
  
  <pre><code> {
     "bookDetail": {
      "title": "aaa",
      "author": "aaa",
      "image": "https://",
      "text": "aaa",
      "series_no": [
          {
              "id": 2
          }
      ],
      "created_at": "2019-08-27 15:19:10"
    }
  }
  </code></pre>
  
  <p>This is two.json</p>
  
  <pre><code>{
  "bookDetail": {
      "title": "Test",
      "author": "TEst",
      "image": "https:/riv19q9x.png",
      "text": "Test",
      "series_no": null,
      "created_at": "2019-08-27 15:13:56"
    }
  }
  </code></pre>
  
  <p>This is detail.model using bloc flutter</p>
  
  <pre><code>class BookDetailModel {
      BookDetail bookDetail;
  
      BookDetailModel({
      this.bookDetail,
   });
  
  factory BookDetailModel.fromJson(Map&lt;String, dynamic&gt; json) =&gt;
    new BookDetailModel(
      bookDetail: BookDetail.fromJson(json["bookDetail"]),
     );
  
  Map&lt;String, dynamic&gt; toJson() =&gt; {
      "bookDetail": bookDetail.toJson(),
    };
  }
  
    @JsonSerializable(nullable: true)
     class BookDetail {
     String title;
     String author;
     String image;
     String text;
  
     List&lt;SeriesNo&gt; seriesNo;
     DateTime createdAt;
  
     BookDetail({
      this.title,
      this.author,
     this.image,
     this.text,
     this.seriesNo,
    this.createdAt,
   });
  
  factory BookDetail.fromJson(Map&lt;String, dynamic&gt; json) =&gt; new BookDetail(
      title: json["title"],
      author: json["author"],
      image: json["image"],
      text: json["text"],
      seriesNo: new List&lt;SeriesNo&gt;.from(
          json["series_no"].map((x) =&gt; SeriesNo.fromJson(x))),
      createdAt: DateTime.parse(json["created_at"]),
    );
  
    Map&lt;String, dynamic&gt; toJson() =&gt; {
      "title": title,
      "author": author,
      "image": image,
      "text": text,
      "series_no": new List&lt;dynamic&gt;.from(seriesNo.map((x) =&gt; x.toJson())),
      "created_at": createdAt.toIso8601String(),
    };
   }
  
    @JsonSerializable(nullable: true)
    class SeriesNo {
     int id;
  
     SeriesNo({
       this.id,
    });
  
    factory SeriesNo.fromJson(Map&lt;String, dynamic&gt; json) =&gt; new SeriesNo(
      id: json["id"],
    );
  
    Map&lt;String, dynamic&gt; toJson() =&gt; {
      "id": id,
    };
  }
  </code></pre>