making the string calculator handle an empty string