Check if nullable int has value and compare value to another integer Question might be more appropriate in StackOverflow, however I'd also like a review.

I'd like to make my code inline as I feel like this could be possible, I'm just not sure how.

int highestWeightOfParcel  = 0;
if (collo.WeightGrammes.HasValue)
{
    if (collo.WeightGrammes &gt; highestWeightOfParcel)
    {
        highestWeightOfParcel = collo.WeightGrammes.Value;
    }
}


Could I apply the same technique as this? :

int heigth = collo.HeightMm.HasValue ? collo.HeightMm.Value &lt; 10 ? 1 : (collo.HeightMm.Value / 10) : 0,


Is there a 'better'/simpler way of writing this?
There is really no need to check HasValue in this situation. It is sufficient to compare with highestWeightOfParcel because if collo.WeightGrammes is null the comparison is false for any value of highestWeightOfParcel:

int highestWeightOfParcel  = 0;

if (collo.WeightGrammes &gt; highestWeightOfParcel)
{
    highestWeightOfParcel = collo.WeightGrammes.Value;
}