Returns whether this has unit as its only unit (and as a numerator).
this
unit
bool hasUnit(String unit);