Remove code duplication in view helper

yes that is why i thought we should just use `instanceof`

Whats the motivation behind branding?