Null safety for getDescriptor.