Add a try/catch around Float.parseFloat();

Change-Id: I448ae55ae501fc47e723b8d7400e8d2641bfde7b