added fucntion to check if string is empty.