Check if type is html

Don't always add the profiler, only on html pages.