TypeError: Cannot call property length in object . It is not a function, it is "number".