How to handle null value in list in java