fix(views): check parameter type before formatting attributes

Refs #6458