Replace return value of type() with named values
Merge pull request #39 from vheon/fix-type-parameter-clarity

Replace return value of type() with call to the function