properly handle non-numeric strings in parseFloat, parseInt