String's isEmpty method is API 9 and up, use length == 0 check instead