Checking whether a string is numeric or not