Factoring out String length check.

All string generating methods were performing the same check for the
type and value of the ``length`` argument. I have created a new
``is_valid_length`` method that removes the redundant code and seems to
speed up tests ten-fold.
Rename `is_valid_length` to `is_positive_int`

Also use it to perform a validation check in `generate_iplum`.
Make method private
Merge pull request #24 from Ichimonji10/refactor-string-length

Rename `is_valid_length` to `_is_positive_int`
Merge pull request #23 from omaciel/refactor-string-length

Factoring out String length check.