Rescue an error if a text is nil for CLI

TODO: refactoring