(PUP-2794) Fix problem with check for >0 params
There was a problem with the check for empty range, as the size
of a range Integer[0,0] is not 0, but 1 (there is a 0 in the range).
Also adds test to check that type parser produces a Callable with
a Unit type when the range so requires.