Allow empty string after trim

Fixes #299