From JSDoc info make sure that your arguments are valid rewriting your function with falafel