This happens when you have set the interface of prop optional and typescript is complaining what it'll do if that comes null/empty
Function property that could be undefined will be catered like this.
Note: chaining operator (?.) is only required if you have put the functional as optional using same chaining operator.