Use Objects.equal() instead of ==.