Why are you swallowing the exception here?  IMO an invalid value should raise an exception.