corrected type and type checking for pad_character

should fix #33, please review
Merge pull request #36 from arose/patch-2

corrected type and type checking for pad_character