[SPOILERS] Build an Optional Arguments Sum Function

If you have any advice, I’m all ears.

const checkNumber = (nbr) => {
  return typeof nbr === 'number'
}

const addTogether = (...args) =>{
 const [a,b]=args
 if (!checkNumber(a)) return undefined

 if (checkNumber(b) ) return a+b
 
if(args.length === 1)  return (x) => checkNumber(x) ? a+x : undefined

return undefined
}
addTogether(2, undefined);

What are your thoughts on inline the checkNumber?
const isNum = v => typeof v === ‘number’

And usage: isNum(y)

this code passes all checks its perfect

Passing all checks does not make code perfect