Added some validation to 'Modify String' problem