Throw exception when non scalar value passed to escape string