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