Kibana scripted fields

I've never seen the use of .empty before, are you sure you don't want .size() to determine that the field exists? Here's the walkthrough documentation.