This is better than throwing a NumberFormatException as done before. Callers can easily forget to handle NumberFormatException. It's better to return an Optional so that it's obvious that callers must handle the case where parsing didn't succeed. Change-Id: I0bade70a31430674c739f7e1af51f71f22027c88 Signed-off-by: Edwin Kempin <ekempin@google.com>