Fix crash in is_empty
fix(elastic): fix is_empty method