check params existance before using them
Merge pull request #53 from hasanloo/master

check params existance before using them