Safety checks for when @socket goes nil