Check whether a field is translated or not

I would like to add a category to an item depending on whether it has a field translated in a specific language or not.

Something like:
If the field is translated into German, echo class ‘german’; otherwise, don’t do anything.

That is what I tried so far but I can’t seem to success:

div class="item <?php if( $album->content(kirby()->language()->code('de))->text() ): ?>german<?php endif; ?>">

Does someone know if there’s a way to achieve that?
Thanks a lot

This actually worked!
<?php if( $album->content('de')->text()->isNotEmpty()):?>german<?php endif; ?>