chore(tasklist/forms): Adjust if-clause

- check whether the passed extensions is an array or a function in form
  script directive

related to CAM-1322