replace 'instanceof' with tests on attributes for WireframeHelper