Assume that error from callback may not have stack property

My script has errors to throw which do not have stack property. That code gives me error "undefined"..