replace with isEmpty()

use the method isEmpty() from String class instead