Fix isFloat to check that there is only one period "."