|
|
|
|
|
by LandR
2490 days ago
|
|
Also check that person isn't null, probably. person?.firstName?.trim(); What (s)he means though is in Java if firstName is there then it will be a string. In Clojure firstName might be anything, a string, a number or even an entire other hashmap or type, literally anything. This might or might not cause a runtime crash if you are doing something that assumes it's a string. So you check. |
|
To be honest I rerely see the typeof check in clojure code.