Think this is an OOP question... so the correct answer is to switch by the type of the instance. In PHP you do this with "instanceof", like here in MappingTest.php:

    protected function filterNumericFields(&$fields) {
        foreach ($this->view->field as $id => $field) {
          if (!($field instanceof NumericField)) {
            unset($fields[$id]);
          }
        }
      }

Note: dpm is bad with nested objects... you should set up a debugger like xdebug.