fix error with titlecase filter when input is undefined