Adds check for type of build mode in CustomHtmlHelper