```if (message.fileDescriptor?.isImageType ?: fals...
# getting-started
j
Copy code
if (message.fileDescriptor?.isImageType ?: false)
Is there a better way to write that ? because
fileDescriptor
can be null, i'm forced to write
?: false
, maybe kotlin as a sugar syntax to avoid the
?: false
like "if this is null, it's false"
m
You should write
Copy code
if (message.fileDescriptor?.isImageType == true)
馃憤 7
j
Thanks 馃檪