Add nullptr checks to SurfaceTreeModel
We called into waylandServer() without checking and on Neon the connects with a null surface crashed.