Returns value if it is instance of error otherwise wraps value to new Error instance.
value
Error
Error or other value
value if it instance of error Error otherwise wraps value to new Error instance
Returns
value
if it is instance of error otherwise wrapsvalue
to newError
instance.