Text format
Check arguments type

Throw an exception when argument is null or not a string as excepted
New tests

Added new tests to enforce arguments type checking