Fix discuss page: js failed when there's no discussion yet

If there's no discuss the server will return null, the script call .length() without validating. From the user's view, the loading icon will remain showing.