java optional get first element of list