wayland: Check surface before looking up modals
Near window destruction, there might be cases where the surface actor does no longer have a surface, yet it's still in the stage and eligible for picking. In that situation looking for modal dialogs attached to this surface will evidently fail, so avoid this check on a NULL surface.
Closes: #3332 (closed)