Update modules/directives/codemirror/codemirror.js

Using MDN-documented version of type checking as per #303 discussion