isEmpty não está definido

isEmpty() not isempty(). Functions is a case sensitive.
Programming Is Fun