Getting Error 500 when searching for queries on Issue Navigator


Our application is running on Jira Server and we recently upgraded it to version 8.13.2. We have two custom fields, “Team”, “Application” in our application. When we are trying to query over any combination of values of these two custom fields, it gives us a 500 error. We looked into the custom plugin which was giving us the Null Pointer Exception. Using logging we found out the following line was giving us the errors. We are using JIRA APIs here.
< issue.getIssueType().getName() >
It seems like the issue being returned is null and subsequently the issue key and issue type are being shown as null.

Does anyone know the resolution of this ?