Use formal error checking to validate a not found err.
Merge pull request #1577 from brendandburns/fix

Use formal error checking to validate a not found err.