Format
Catch possible exception
Add special case for empty string