isEmpty() since API 9, but we need to be API 8 compatible