I would say that if call sometimes returns a deferred, it should explicitly return null on return after websocket call up on line 95, and a @return documentation should be added to the function describing this.