Add check to ensure truncate does not error

- check if input exists before acting on it
- silences thrown error
	- spirit of template filter, do nothing rather than fail if input is incorrect