Fix a bug when closing a grid edit modal box, avoid a blocking JS TypeError

Proposed fix for https://github.com/kendo-labs/angular-kendo/issues/299