How do I do this if entity is nullable? ```entity:...
# getting-started
p
How do I do this if entity is nullable?
Copy code
entity::class
t
afaik, null is null, does not have a class. because that expression is resolved at runtime. you could do
entity?.let{ it::class }
but this would return null when entity is null
p
got it
t
I don’t think you can get the supposed class of null. if I am wrong, happy to learn something new
p
I think you are right
im gonna just do a null check before
i was just wondering if there was something like
?::
t
I could not find it, I was dealing with this thing like 2/3 weeks ago too 🙂