very dumb question, why does idea complain about unsafe cast in
fun cast(value: Any?) = (value as? Map<String, String?>)
?
maybe followup question, am I misusing
as?
? context, in this scenario I know that
value
might not be a map, so using
as?
on purpose since it returns
null
, but this “null-trick” makes the cast safe in my eyes, since `null`s need to be handled explicitly