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
Merge pull request #19 from benjaminapetersen/feature/truncate-fix

Add check to ensure truncate does not error