Added check if html output exists in the view