Added some validation for the input parameters
Merge pull request #1 from SeriousM/patch-1

Added some validation for the input parameters