Protect against nil being passed to [SHK error:]
Merge pull request #663 from scompt/nil_error

Protect against nil being passed to [SHK error:]