setState never occures

Two changes for better parsing of non-existing input sources:

1 - use goog.isDefAndNotNull(source) in the condition (null is also considered as valid source now)
2 - call setState before goog.asserts.fail
Merge pull request #1800 from jachym/patch-1

setState never occures