Changed deprecated isempty() to is_empty()