More robust length checking.
If there are no abbreviations, there is no need to draw a Legend box.
Empty function arguments also seem to occur.