prevent incorrect codegen with empty path string
fixes https://github.com/Polymer/polymer-expressions/issues/42

investigation notes here: https://github.com/Polymer/polymer-expressions/issues/42#issuecomment-53829454

it didn't look to me like isIndex was called on a hot path, so I just added a guard against empty string. Let me know if there's a smarter way to do that check.

R=rafaelw@chromium.org

Review URL: https://codereview.appspot.com/136950043