improve parameter check with args-js library
added tests