Checked the ref to context for null.

It could be null, because the init-process might not be fired by
activity or fragment that use error-handling.