[Finishes #71810236] make sure workspace still exists

New relic JS error.

Had a nasty time finding a repro, but turns out this can happen if you drag a function into the trash by it's little * icon in the top left (I believe because it's trying to both open and destroy the popup).