Fix compilation on SDK < 9 

String.isEmpty() requires Android SDK 9