Fixes on forum

Added empty check in topic and post insert
Indentation fix