https://codetofun.com/jquery/deferred-isresolved/
jQuery deferred.isResolved() Method