added js-spec if argument is not defined as object