Checking if method arguments are valid.
Merge pull request #6 from tslamic/validate

Checking if method arguments are valid.