Kamila
03/29/2022, 6:30 PMval bankAccount: BankAccount? = null
When I parse it to DTO object, which takes bankAccount as String, I use bankAccount.toString()
which, in case of null, ends up being “null” String on DTO object.
How should I approach it, so the value is actually null or property is omitted?Joffrey
03/29/2022, 6:51 PMbankAccount?.toString()
(with safe call operator) would return an actual null value if bankAccount is null itselfKamila
03/29/2022, 7:04 PM