In function timeout the context is optional. In debug mode context is checked for type Object.

If no context is given this fails. Now context is only checked if context is given.