Fix trimming meta string

Handle case when meta is nil or not a string because s-trim cannot be
used with input other than a string.
Merge pull request #88 from ptrv/fix-meta

Fix trimming meta string