Testing whether a string contains only numerical data