isEmpty does not exist in older version of android
Add support for older and newer versions

Add support from Eclair (2.1) to version (2.3).