In my graphql schema there are several optional fields
cityId: Int!
amount: Int!
loanTerm: Int!
schemeId: Int
historyId: Int
earlyRepayment: Boolean
earningsConfirmation: Boolean
and in My golang i Have this struct
CityID int `json:"cityId"`
Amount int `json:"amount"`
LoanTerm int `json:"loanTerm"`
SchemeID *int `json:"schemeId"`
HistoryID *int `json:"historyId"`
EarlyRepayment *bool `json:"earlyRepayment"`
EarningsConfirmation *bool `json:"earningsConfirmation"`
as you can see optional fields have pointer to int (*int) should I check them for nil value before uisng?