catching potential number format exception