Fix isunit() not able to check if dimension has no unit.

Currently `isunit(32, '')` evaluates with a cryptic error message: "error evaluating function `isunit`: Object [object Object] has no method 'toUpperCase'. Expected behaviour: it should evaluate to `true` without an error.