is_scalar function

Test whether x is of length 1