Use goog.isNull in if statements
Use goog.asserts.assertInstanceof to check the getSource return type

See 1499af397d9852eded193a8b06ea9d8bad71a49f