elasticsearch/elasticsearch — comment on commit 49b6d70dfdeeac2a9a12647a83b9ef3613346faa
File: src/main/java/org/elasticsearch/index/query/ExistsFilterParser.java line 77
By kodart:

You can get rid of checking for null if QueryParseContext will always return a valid object. Instead of returning a null you may return an instance of NoMappers implementation which will always return false for hasMapper(). That instance may be a single one since it doesn't have state, so you don't need to create it each time.