Fix a TextEditorView unit test breakage.

A last-minute change resulted in isDirty() being able to return null
instead of false. This is due to how JavaScript handles conditionals and
their return values.

We now explicitly check a value against null to guarantee a boolean
response.