How do I print the last level of a category? Some categories have 2 levels, some only have 1 level.

How can I print the "last" level of an entry if for some it is level(2) and others it is level(1)?
I've not actually done this, but I'm guessing:

{% set category = entry.categoriesFieldHandle.last() %}

(...then .level on that to get the level if that's what you want).  .last() is the opposite of first().  

(Make sure you check category|length as it might be that no categories are assigned...)