How is it possible that new Date() could be null? I have this line of code:
state.lastJsonCall = (new Date()).format(“yyyy-MM-dd’T’HH:mm:ss.SSS’Z’”)
But it’s frequently throwing an error:
error java.lang.NullPointerException: Cannot invoke method format() on null object
How is that possible? Any recommendations on working around it?