add nil error check on error text

Bounty: https://assembly.com/coderwall/wips/244