title: Why do I get NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' …?
body: <p>CODE:</p>
  
  <pre><code>public void onBindViewHolder(@NonNull MyHolder holder, int position) {
  
          String message = chatList.get(position).getMessage();
          String timeStamp = chatList.get(position).getTimestamp();
  
          Calendar cal = Calendar.getInstance();
          cal.setTimeInMillis(Long.parseLong(timeStamp));
          String dataTime = format("MMMM d, h:mm a", cal).toString();
  
  
          holder.timeTv.setText(dateTime);
  </code></pre>
  
  <p>ERROR MESSAGE:</p>
  
  <pre><code>java.lang.NullPointerException: Attempt to invoke virtual method 'long 
  java.lang.Long.longValue()' on a null object reference
  </code></pre>