add checks to avoid errors when empty/short stack trace
Merge pull request #4 from jessefulton/fix-empty-stack

add checks to avoid errors when empty/short stack trace