Removed checking of string emptiness using strlen.