function toggleValidCss(isValid, validationErrorKey) {
    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
    $element.
      removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).
      addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
  }
@ngdoc function
@name { ng.directive:ngModel.NgModelController#$isEmpty
@methodOf ng.directive:ngModel.NgModelController

@description
This is called when we need to determine if the value of the input is empty.

For instance, the required directive does this to work out if the input has data or not.
The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.

You can override this for input directives whose concept of being empty is different to the
default. The `checkboxInputType` directive does this because in its case a value of `false`
implies empty.