added code to ignore empty string as an argument of add().