Fixed bug for linesNeededToDrawText function.

Last parameter maybe expression and if this expression returns number it leads to exception when trying to evaluate it as number.