Added check for undefined to the 'length' and 'length_is' filters so they don't explode if applied to undefined.