Minor style fixes, check for nil messages