[indexPattern] don't use scripted fields when the source doesn't contain a doc
Merge pull request #2292 from spenceralger/fix2239and2286

Safer scripting for dates and missing fields