in length filter: use if (input.hasOwnProperty('length') (to be more strict)
length filter should return empty string if not an object or array